Why am I getting a 'command not found' error when executing commands?

Updated -

The error message command not found means the shell cannot find the command neing executed. It does not necessarily mean that the command does not exist on the machine.

To determine if the command exists on the machine, use the whereis command. This command will search standard Linux directories for the command entered.

whereis <command>

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.