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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems setting paths

Status
Not open for further replies.

nroberts420

Programmer
Jun 24, 2003
27
US
I'm trying to use profile.local to set a path in Red Hat 9. I want to be able to use all the commands in the sbin folder just like I would any other command (without having to type the path). I entered this line into the file and even after I run the script it still doesn't work.

PATH=/sbin:$PATH

I have used commands similar to that and it has worked. Why doesn't that work?
 
Trying adding the command to the ~/.bash_profile file.

Chris
 
I just tried that and nothing, I have this line in my .bash_local file for my user account:

PATH=/sbin:$PATH:$HOME/bin
 
What happens if you run that command from the shell?

echo $PATH
PATH=$PATH:/sbin
echo $PATH

ChrisP
 
if I do it that way it works just fine. In the file the line after the path is set is an export PATH command.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top