[Sderby] Updating Path Environmental variable

James Gibbon sderby at mailman.lug.org.uk
Sat Apr 12 22:10:01 2003


andre.hefer@avhservices.co.uk wrote:

> I would like to update my path environmental variable. I think
> this should be in a file called /etc/profile , the header in this
> file says not to edit this file because SuSe will overwrite it on
> upgrade but to edit /etc/profile.local instead. Unfortunately this
> file does not exist.
> My questions are:
> (1) Should I create it; and
> (2) Does it require a reboot for the O/S to recognise it.
> 

(1) no - you can set your PATH in a profile file specific to 
your own userid.  You don't say what shell you use, but if you 
use bash (as is set up by default for most distros) you need to 
edit a file called .bashrc in your home directory.  For example,
to add /usr/local/scripts to your PATH, include the line:

export PATH=$PATH:/usr/local/scripts

If, like me you use ksh in preference to bash (you'll know if 
you do :) then edit ~/.profile instead of ~/.bashrc, otherwise
the above applies exactly.

(2) No, but you should log out & in again ideally.


Hope this helps,
James