The command could not be located because is not included in the PATH environment variable

In this article, we will find the solution for following error message.

Command 'cat' is available in the following places * /bin/cat * /usr/bin/cat The command could not be located because '/bin:/usr/bin' is not included in the PATH environment variable. cat: command not found

The command could not be located because is not included in the PATH environment variable

Reason:

Our PATH variable has been meesed up. We have to add /usr/bin in $PATH.

Solution:

We have to add /usr/bin/ to $PATH to fix this issue.

1. Run the following command on the terminal.

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

2. But, above command is only for current session, if we log off and login back, we will get same error. To avoid we have to set PATH permanently by running following command.

echo "PATH=/usr/bin:$PATH" >> ~/.bash_profile

So in this article, we have seen solution for the error “The command could not be located because is not included in the PATH environment variable: