[Techtalk] Linux PATH question
hobbit at aloss.ukuu.org.uk
Fri Oct 1 23:16:02 EST 2004
On Fri, Oct 01, 2004 at 11:35:00AM -0500 or thereabouts, ed orphan wrote:
> I used to be able to edit the PATH directly from .bash_profile
> but I can't even find where the PATH is stored in Red Hat.
> Yet another "improvement" I don't comprehend.
You should still be able to edit your PATH environment variable:
nothing has changed about how PATH is set on Red Hat/Fedora for
years. There is a default path set by /etc/profile. (There is a
pathmunge() function in there -- well, on Fedora Core 2 and I don't
think it's new on that -- which I do not pretend to understand).
Anything in ~/.bash_profile adds to the one in /etc/profile.
So if you want to add to it, just add stuff to your ~/.bash_profile.
Over the years, my .bash_profile has acquired this, for example.
# User specific environment and startup programs
export PATH CVSROOT LC_COLLATE [...etc...]
If you want to remove specific directories from it for the template
directory for new users to pick up details from (for example, if you
are a systems administrator who does not want your users poking about
in /usr/local/ or something), then I am less sure.
But it's half an answer, at least :)
More information about the Techtalk