[KLUG Members] Change PATH

Adam Tauno Williams adam at morrison-ind.com
Tue Feb 7 15:02:37 EST 2006


> It shows the changed path right after I execute the command, but then
> the path reverts when I exit, so when I come back it's back to the
> original.

Correct,  your change only applies to children of the process where you
made the change.  Changes don't flow 'up'.

> I read online that PATH can be directed edited in /etc/profile, but I
> don't see a line starting with PATH in that file.

In modern UN*Xs it has gotten rather complicated, in that the script
tries to autodetect and build the PATH.

You can add a line to the bottom like:
export PATH=$PATH:{my new directory to be in the path}

Personally I like to just skip the labyrinthine mess that /etc/profile
has grown into and set this stuff in /etc/security/pam_env.conf

Then some distributions put stuff in /etc/sysconfig that might play with
the PATH.  /etc/sysconfig was a neat idea till everything and the
kitchen sink got shoved in there.  Text files are great for
configurations,  until they get to be 100...200...300... lines long.

Sometimes I just wish I could fire up regedit and find the
*&^&*@^&(*)()@ value.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.kalamazoolinux.org/pipermail/members/attachments/20060207/d70bea87/attachment.bin


More information about the Members mailing list