Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Just like the title says, it always asks me to go to the direct path.

ie:

iwconfig doesn't work. I have to type /usr/sbin/iwconfig

share|improve this question
1  
What are the contents of your PATH variable? –  John T Apr 7 '11 at 3:13
    
/home/max/bin /usr/local/bin /usr/bin /usr/bin/X11 /bin /usr/X11R6/bin /usr/games usr/lib/mit/bin seems like alot? should this contain /sbin and /usr/sbin? how would I do that (do I export all of those paths at once?) thanks –  MaxMackie Apr 7 '11 at 3:16
add comment

1 Answer

up vote 1 down vote accepted

You can edit ~/.profile or ~/.bashrc with an editor and write in any line

export PATH=$PATH:/usr/sbin

Supposing your $PATH variable is /home/max/bin:/usr/local/bin:/usr/bin:/usr/bin/X11:/bin /usr/X11R6/bin:/usr/games:usr/lib/mit/bin in your case, $PATH will be appended with :/usr/sbin

To make the change happen in your current shell session write:

. ~/.profile

or

. ~/.bashrc

depending on the file you edited before.

share|improve this answer
    
thanks for the help –  MaxMackie Apr 7 '11 at 4:17
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.