setting PATH variable.
I have SUSE Linux and I'm trying to set my path variable.
I have added: Code:
PATH=$PATH:/home/mynewDirectory/ I want this to remain always so I added the above to both the Code:
/home/username/.bashrc Why is this?? |
Hi
It might be the case that your profile file is one of the those in which you had made entries. Please let us know the output of this in your login shell: Code:
echo $SHELL |
Thanks the output is:
Quote:
|
Do you have additional initialization files like ~/.bash_profile or ~/.bash_login?
|
nope just .bash_history
Thanks |
opensuse 12.1 uses a "local" version of those files
Quote:
edit "/etc/profile.local" the same goes for Quote:
|
If you edit the files in /etc/ as John VV suggests that will apply the setting for all users.
If you just want to do it for your own usercode then make yourself a .bash_profile file and put the PATH declaration in there. Making it a per-user setting has the advantage over modifying things in /etc/ that if you back up your home directory, wipe your machine, re-install it and then copy your home directory back, you still have that setting. This article, http://www.joshstaiger.org/archives/...rofile_vs.html amongst many others explains when .bashrc is parsed and when .bash_profile is parsed. |
All times are GMT -5. The time now is 03:56 PM. |