Settiing paths for bash
Hi there,
I have found out that there are many files named .bashrc. If I want to add a PATH for example to avoid ./ when I want to compile C programs from a current directory, to which .bashrc exactly do I need to add PATH=$PATH: <whatever path> Regards, Jonathan |
There is only one .bashrc called .bashrc. Another conf file for bash is .bash_profile. I know there is a slight difference between the two while one is executed for remote login and the other for local login (or something like that).
Maybe, it's what you need: to define the path in .bash_profile. To avoid to handle two similar file, I'll advise you to use a symbolic link from one to the other. |
the one in your home directory.
|
whansard is exactly right about your own login. To affect all users, put the same PATH=$PATH: <whatever path> code in the "/etc/profile" file.
|
Quote:
export PATH=$PWD:$PATH Then run your program without ./ |
All times are GMT -5. The time now is 08:12 PM. |