I have a strange problem with $PATH..
Ciao to Everybody..
I'm not so frendly using Linux, I want to know many HowTO, so.. Please, Help ME! I'm using SuSE 9.0, and because I need to change it, I had many problems modifing the PATH variable.. ..better, I have modified PATH, entering in the ~/.bashrc file my new 2 lines PATH=$PATH:/new_path/to/add export PATH The first time I open shells everithing's OK, but if I reboot the machine, the PATH value change.. My new PATH entry is set 3 times.. So strange, no? I don't know why, I have tried also with ~/.bash_profile but in this case PATH doesn't change.. What I can do? Help me, please.. CIAO ;o) |
You need to make the change to .bash_profile and not .bashrc .
.bash_profile is run once when you log on. .bashrc is sourced everytime you open a new terminal in x-windows. This is why the path variable keeps groing on you. Check 'info bash' for details on which files run. Also from your home directory, type: cat .bash_profile. There will probably be a comment indicatiing where toinsert your path command. |
Thank You for the advice..
I've tried to insert the PATH definition in ~/.bash_profile instead of .bashrc but the system seems to ignore my instructions.. I have created ~/.bash_profile file because it didn't exists before.. It seems that this file is not sourced by my SuSE.. Incredible! Ciao. |
I've also found this quite annoying!
It depends in which order the files are read and this sometimes seems to vary from distribution to distribution. The bash man page explains in which order they are supposed to be read. Anyway, I've got an explanation of how I fixed this problem, here (sorry can't be bothered typing it out again): http://gnuru.org/index.pl?node_id=676 |
Hello,
as You suggest, I have tried with this files setting but my PATH has 3 entry repeated.. I'm still catching some strange commands in these mentioned file scripts.. Thank You for your Help.. CIAO |
All times are GMT -5. The time now is 05:18 AM. |