how to fix the “command not found” error
“Command not found” is an error message that is displayed in the terminal when the shell is unable to locate an executable file or command that you have entered.
There are several reasons why this error can occur:
- You may have mistyped the command name.
- The command is not installed on your system.
- The command is installed, but it is not in a directory listed in your PATH environment variable.
- The command requires superuser or root privileges to run and you are not currently running the shell as superuser or root.
Check the spelling of the command
Make sure you have spelled the command correctly.
One of the most common causes of the “command not found” error is simply a typo or a misspelling of the command.
It is important to double check the spelling of the command before attempting to run it.
Carefully review the spelling of the command, paying attention to the capitalization.
Many Linux shells have an autocomplete feature. You can press the TAB key after typing a portion of the command to have the shell automatically complete the command or show you a list of possible commands that starts with the letters you typed.
If you run the command before, you can use the “history” command to show a list of previously run commands. The history…