View Full Version : Find program executables (command not found error)

12th November 2004, 11:36 PM
When entering commands on the terminal sometimes you get a command not found error. This means your program could not be found in your $PATH list of directories like /bin /usr/bin etc.

First, check your spelling. Names are case sensitive. Try typing the first few letters and then pressing tab a couple times. Tab completion shows some commands you can run.

Administrative commands like ifconfig for network devices are in /sbin /usr/sbin etc. These are in the root user's path, which makes administrative commands easily available to the administrator.

If you you want to use ifconfig as a regular user, enter the full path: /sbin/ifconfig. You will see your network interfaces. Some programs in the sbin directories require root access to change settings, which is another reason why they are not in a regular user's $PATH.

To find programs use whereis. Run
whereis -b program to see where program is. The -b limits the search to executable programs.

You can also become the root user with root's path. Run
su - and enter the root password. This is useful for making a quick system setting change.