A message of Command not found indicates one of the following:
The command is not available on the system.
The command directory is not in the search path.
To fix a search path problem, you need to know the pathname of the directory where the command is stored.
If the wrong version of the command is found, a directory that has a command of the same name is in the search path. In this case, the proper directory may be later in the search path or may not be present at all.
You can display your current search path by using the echo $PATH command.
Use the type command to determine whether you are running the wrong version of the command. For example:
$ type acroread acroread is /usr/bin/acroread
$ echo $PATH
Is the search path correct?
Is the search path listed before other search paths where another version of the command is found?
Is the command in one of the search paths?
If the path needs correction, go to step 3. Otherwise, go to step 4.
|
|
$ which command
This example shows that the mytool executable is not in any of the directories in the search path using the type command.
$ mytool -bash: mytool: command not found $ type mytool -bash: type: mytool: not found $ echo $PATH /usr/bin: $ vi $HOME/.profile (Add appropriate command directory to the search path) $ . $HOME/.profile $ mytool
If you cannot find a command, look at the man page for its directory path.