How to fix Linux / UNIX: Command Not Found Error and Solution?


When you get the error “Command not found” it means that Linux or UNIX searched for command everywhere it knew to look and could not find a program by that name Make sure command is your path.

You can see current search path with following command:                                             

$ echo $PATH
Sample outputs:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11R6/bin:/usr/local/bin

Usually, all user commands are in /bin and /usr/bin or /usr/local/bin directories.

*Also Checked: How To Install cPanel

All your programs are installed in these directories. When you type the clear command, you are running /usr/bin/clear. So if it is not in your path try to add directories to your search path as follows

export PATH=$PATH:/bin:/usr/local/bin

You can also find out of path of any command with which or where is commands:

$ which ls
/bin/ls

$ which gcc
/usr/bin/gcc

by-

eLite Server Management

We Specialize In cPanel Server Management
Affordable 24/7 Technical Support Company