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)

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972

3 Answers3

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
...
EEAA
  • 109,363
  • 18
  • 175
  • 245
2

Try:

$ dpkg -L something 

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

Peter
  • 909
  • 8
  • 10
  • 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 02: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.

john.dough
  • 103
  • 1
  • 10