Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 139585  / 2 Years ago, wed, september 7, 2022, 2:57:47

When trying to access ~/.bash_profile from Ubuntu Xenial (16.04) in Windows Subsystem for Linux I get the following error:



-bash: /home/<username>/.bash_profile: No such file or directory


Where is it located and how do I edit it?



Thank you!


More From » bash

 Answers
6

From the man page for bash:




By default, it first reads and executes commands from the file > /etc/profile, if that file exists. After reading that file, it
looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that
order, and reads and executes commands from the first one that exists
and is readable.




So it exists in your home directory IF AND WHEN you create it and make it readable.


[#9925] Wednesday, September 7, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
doredtness

Total Points: 153
Total Questions: 113
Total Answers: 106

Location: South Georgia
Member since Fri, Nov 13, 2020
4 Years ago
;