Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permanently set the $PATH rh 7.3

Status
Not open for further replies.

phrogman

Technical User
Jul 2, 2002
4
US
Using RedHat 7.3, how do I permanently set the path for a given user? Currently the path is:

/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/phrogman/bin

I would like the path to be:

/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/phrogman/bin:/sbin:/usr/sbin:/usr/local/sbin

Using "$ PATH=PATH$:/usr/sbin:/sbin" only works for the current session.

Thanks for any help!
 
You can add it to $HOME/.bash_profile:

# User specific environment and startup programs

PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin

At least, you can in 7.2. I doubt that would change between .2 and .3 though. :) Matt
matt@paperlove.org
If I can help, I will.
 
You can also set the path in other places. For example, using the above statement in /etc/profile will set the path for all users.

--Dmitry
 
Thanks a bunch guys!

it works (obviously)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top