$PATH varibale
I'm using fedora core 1
I find some of the commands are not in the $PATH varibale, such as shutdown, adduser/useradd, it is very annoying that i have to type the full path each time, so i used ---------------------------------------------------------- export PATH=$PATH:/sbin --------------------------------------------------------- to allow me to use the command, which works fine however each time i reboot my computer, I'll have to reset those path varibale again. 1. so plesae advise how can i get them done without setting them after each reboot? 2. how can i get all the commands in $PATH varibale |
place the above command in the
/etc/profile file. Just add it at the end on a new line |
you can add these to the users defauilt path in /etc/bashrc for bash or similar places. however root's path will nearly always contain these paths, so i'd suggest you looked at how you are trying to access these commands in the first place. You should not be using these commands as a non root user, that's why they are there, not in /bin etc...
|
Quote:
I'm using these commands as a root, and i thought it should be in the root path, don't know why it is not??? any idea why it isn't |
I have had similar problems with Redhat (7 point something). What I did was that I edited root's ~/.bashrc and added:
Code:
export PATH=$PATH:/usr/sbin/:/sbin Code:
if [ -e ~/.bashrc ] Håkan |
Me too, I have RedHat 9, and for some reason this was not in my path for root either. Seems odd, but I did what hw said above before, and now it works like a charm. I wonder why RedHat doensn't have this automically.
|
All times are GMT -5. The time now is 05:06 PM. |