Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I follow a step by step guide, I have this problem:

$ sudo apt-get install something
$ sudo something
No 'something' command found

Something is installed, and I can find it with 'locate' after running 'updatedb'. But it is not being added to the PATH for some reason. Is this the normal behavior?

I'm on a Ubuntu 10 server edition box (virtualbox)

share|improve this question

Many commands are not in the PATH of a normal user, but are in root's path. You can either modify your PATH to match that of root's or preferrably, just specify the full path to the executable as such:

$ sudo ifconfig
No 'ifconfig' command found
$ sudo /sbin/ifconfig
...
share|improve this answer

Try:

$ dpkg -L something 

It will shows all installed files by something package. Look for files that are on */bin/ directories.

share|improve this answer
    
Also, run echo $PATH to see if the installation paths shown by dpkg -L something is in the user's PATH. – cjc Feb 13 '12 at 2:14

Commands that are run with sudo are run in their own environment. You can adjust the environment in /etc/sudoers via visudo. The PATH variable is called secure_path.

share|improve this answer

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.