[CentOS] Missing In PATH
sam at wa4phy.net
Mon Oct 17 23:51:18 UTC 2005
Look in your home directory for a file called .bashrc. You can put
your path statements in that file, and they will stay there when you log
out. The stock .bashrc looks like this......
# User specified aliases and functions
alisa rm=`rm -i' (the -i asks to confirm the delete)
alias cp=`cp -i' (same for the -i here too)
alias mv=`mv -i' (ditto)
Now, to add your paths, you would enter this
PATH=$HOME:/bin:/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin: etc., as
many bin locations as you have executable files. If your paths get
rather long, instead of using the "/" at the end and so forth, to make
the line more easily readable, you can use the "\" character that means
a newline, and then continue your path statement. You can also set
environment variables in the bashrc as well. This is one of mine:
There are thousands of things you can do with the .bashrc to "automate"
some things. I'm not an expert at this by any means, and sometimes the
man page does not help that much, especially if you have no idea what
some terminology is. Google for bashrc's or kshrc or even shell
configurations and I'm sure you'll find tons of examples.
Hope this helps...
Cody Holland wrote:
>I'm a newb to linux so please be patient. Running CentOS 4. Using
>Bash. I'm not sure what happened, but now for some reason /sbin,
>/usr/sbin, and /usr/local/sbin are all missing from the path. I am su'd
>as root. I've tried several different methods to put this back
>All of these do add the directories to the path until I logout and log
>back in. Then they are gone again. Any help would be greatly
>CentOS mailing list
>CentOS at centos.org
More information about the CentOS