2

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)

3 Answers 3

5

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
...
2

Try:

$ dpkg -L something 

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

1
  • Also, run echo $PATH to see if the installation paths shown by dpkg -L something is in the user's PATH.
    – cjc
    Feb 13, 2012 at 2:14
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .