Click to See Complete Forum and Search --> : Argh... how do I set my PATH?
Wallex
10-14-2002, 01:47 PM
After installing a program, I noticed that I could not run it as root because it wasn't in my path. The program in question is checkInstall, and since it is used for installing software, it goes into /usr/local/sbin/, but that was not in my path... so I wrote
export PATH=/usr/local/sbin/ and then guess what.. it found the command but not anything else.. because I messed up and 'replaced' my path instead of extending it. So... how should I type down path to use multiple paths? and Secondly... since I messed up my root user's path, can anyone tell me which dirs should be on the root's path?
ferreter
10-14-2002, 01:57 PM
In the future do something like this
PATH=$PATH:/usr/local/sbin
export PATH
I'm not at my linux box right now but other path entries for root off the top of my head would be /sbin:/root:/usr/bin:/usr/local/bin
Wallex
10-14-2002, 02:28 PM
hehe... thanks. I'll try to remember it next time I need to change my path, altough changing one's path is not something you do everyday.
-wassup-
10-14-2002, 03:09 PM
but the annoying thing about tha command at least on suse is this..everytime i run
export PATH=$PATH:/usr/local/sbin
it works on for that session
so i added it to my bash.basrc to make it global. dont know about the file name on ur distro though.
Wallex
10-14-2002, 03:19 PM
Originally posted by -wassup-
but the annoying thing about tha command at least on suse is this...
... dont know about the file name on ur distro though.
So you know about that problem in Suse, but not in my distro? I see...
..I have realized that a lot of people never read the signature of others.
-wassup-
10-14-2002, 03:22 PM
oops :rolleyes:
bwkaz
10-14-2002, 08:13 PM
As long as you've only typed the export command in one terminal session, just exit that shell (or close that terminal), open another one, and you'll be OK.
If you've changed your bash config files, then don't do that. ;) Run the commands in a shell first, to make sure they work and do what you want them to do. *Then* add them to your bash startup stuff.
Root's path is generally something like /bin:/sbin:/usr/bin:/usr/sbin
Sometimes, /usr/local/bin will be there as well -- it might be a good idea to add it now even if it isn't there.
askrieger
10-14-2002, 08:19 PM
Mandrake 9 root user's $PATH "/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin" but there isn't anything in either /usr/local/sbin or /usr/local/bin until I put something there.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.