"Command not found" means the command you tried to run was not found in your path. The path is the directories the system will look through to find the command code, or program, you are asking it to execute. Here is an example, I'll use the command lsusb to illustrate the 'how to fix' part.
Quote:
lsusb
bash: lsusb: command not found
|
I ran the command lsusb, and got 'command not found'.
Next, i ran the command 'locate' to find the command code.
Quote:
locate lsusb
/usr/sbin/lsusb
/usr/share/man/man8/lsusb.8.lzma
|
I get two things, the first is the binary code, the second is the man page for the command.
Now I try it again, this time I supply the path to the binary.
Quote:
/usr/sbin/lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f9:0028 Brother Industries, Ltd Printer
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
|
This time it runs. I get the expected output.
To find out what your path is, at a command prompt, type 'echo $PATH' without the quotes. The system will print out to your screen ( standard out ) the value stored for path.
Here is mine.
Quote:
echo $PATH
/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/cliff/bin:/sbin:/usr/share/xmltv
|
If you look through the output, /usr/sbin/ is not listed. So the system gave me 'command not found'. It worked when I told it where to look.