Table of Contents
This tip is about the how to Fix “Command Not Found” Error in Linux. So read this free guide, How to Fix “Command Not Found” Error in Linux step by step. If you have query related to same article you may contact us.
How to Fix “Command Not Found” Error in Linux – Guide
At the point where you get the error “Command not found”, it means that the PC has searched wherever it could look and was unable to track down a program with that name.
You can control where the PC looks for orders, however. So, “Command not found” doesn’t really mean that the program isn’t anywhere in the system. It may simply mean that you haven’t provided the PC with enough information to locate it. Before asking your executive for help, there are a few things you can do:
You can see the current search path with the following command:
$ echo $ PATH
Sample results:
/ usr / bin: / bin: / usr / sbin: / sbin: / usr / X11R6 / bin: / usr / local / bin
Normally, all user commands are in the /bin and /usr/bin or /usr/local/bin directories.
All your programs are installed in these directories. By typing the clear command, you are running / usr / bin / clear. So if it’s not in your path, try adding directories to your search path as follows
export PATH = $PATH: / bin: / usr / local / bin
You can also find out the path of any command with which or where the commands are:
$ which ls / bin / ls
$ which gcc / usr / bin / gc
Final note
I hope you like the guide How to Fix “Command Not Found” Error in Linux. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.