

It is quite important because we will need to add this path to our PATH environment variable later on. With the find command, you are able to locate the binary along with the directory where it is stored. Verify that the binary actually exists by searching for the binary on the system.

Let’s say for example that you cannot run the “ ls” command. There are really no points going further if you mispelled the command or if you didn’t install it at all. The first step to solve this error is to verify that the command you are looking for actually exist on the system. Verify that the file exists on the system Now that you understand how environment variables are related to your bash interpreter, let’s see how you can solve your error.

It is an important point to understand because not being able to run a command does not mean that your binary was deleted on the system. If I were to remove an entry from the PATH, or remove the PATH all together, you would not be able to run commands in the bash without specifying the entire path to the binary. They are the different paths visited by my interpreter in order to run commands. usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/binĪs you can see, PATH is defined by a list of different system paths delimited by colons. To have a look at your PATH environment variable, simply use the “ echo” command with the PATH variable. PATH is an environment variable that lists the different directories that your bash terminal will visit in order to find utilities on your system. Verify that the package is correctly installedīefore starting out with the solution, it is important to have a few concepts about what the PATH environment variable is and how it is related to the commands you run.Reset the PATH environment variable properly.Fixing your profile scripts : bashrc, bash_profile.Verify that the file exists on the system.
