Operating Systems > Linux and UNIX
add to path
Calum:
quote:New Q:
whats the diff between /bin and /sbin ??
--- End quote ---
they're different directories? is this a trick question?
also i think it was a bit cruel to answer your OWN question and then TAUNT VoidMain over his trying to help!
badkarma:
void :
don't want to be a nitpick but usually it's desirable to put $PATH at the end, not at the beginning. I.E. qt defines a QTDIR, $QTDIR/bin is in your path, if you use multiple qt version typing export PATH=$PATH:$QTDIR/bin is not the same as export PATH=$QTDIR/bin:$PATH (in the first case, the $QTDIR/bin already present in the path will be used)
bob:
/bin is for normal binaries, /sbin is for binaries which require root priviliges (if I'm not mistaken)
Calum's answer is also entirely correct ofcourse though :D
Master of Reality:
quote:Originally posted by Calum:
also i think it was a bit cruel to answer your OWN question and then TAUNT VoidMain over his trying to help!
--- End quote ---
actually... taht is voidmains answer that i posted... I got it from another thread and changed it a little.
voidmain:
quote:Originally posted by BadKarma:
void :
don't want to be a nitpick but usually it's desirable to put $PATH at the end, not at the beginning. I.E. qt defines a QTDIR, $QTDIR/bin is in your path, if you use multiple qt version typing export PATH=$PATH:$QTDIR/bin is not the same as export PATH=$QTDIR/bin:$PATH (in the first case, the $QTDIR/bin already present in the path will be used)
--- End quote ---
No, no, no, no, no. Did I say "no"? UNIX Security 101. You might as well put "." as the first directory in your path. You always want the "system" directories first in your path, and then add what you want at the end (although even then you should be careful). It opens you up for trojans if you do otherwise. If you would like examples I would be more than happy to give a few.
[ June 26, 2002: Message edited by: VoidMain ]
Navigation
[0] Message Index
[*] Previous page
Go to full version