bash: command not found
TL;DRThe bash shell could not locate the program or script you tried to run, which usually means the command is missing, misspelled, or not available in your current environment.
Most likely cause: The command or program is not installed on the system
Try first: Verify the exact command spelling
Likely causes
- The command or program is not installed on the systemmost likely
- Typo or incorrect command name in the script or terminalpossible
- The directory containing the command is not listed in the PATH environment variableless likely
How to fix it
Safest first: SafeChanges settingsDangerous
Verify the exact command spellingSafe
Double-check the command you entered or the line in your script for any typos.
Check if the command existsSafe
Run the type command to see if bash can find it anywhere.
type yourcommandInstall the missing packageChanges settings
Use your system's package manager to install the program if it is available.
sudo apt install packagename (or equivalent for your distro)⚠ This will modify your system by installing software.
If that didn't fix it
Run 'echo $PATH' to inspect the search path and compare it with the location of the command.
When to see a technician
If this error occurs inside a critical script or deployment pipeline, ask a developer or system administrator to review the environment setup.
Quick answers
- What does bash: command not found mean?
- The bash shell could not locate the program or script you tried to run, which usually means the command is missing, misspelled, or not available in your current environment.
- What causes bash: command not found?
- The command or program is not installed on the system. (most likely) Typo or incorrect command name in the script or terminal. (possible) The directory containing the command is not listed in the PATH environment variable. (less likely)
- How do I fix bash: command not found?
- Try these in order, safest first: 1. Verify the exact command spelling. 2. Check if the command exists. 3. Install the missing package.
- What if that didn't fix it?
- Run 'echo $PATH' to inspect the search path and compare it with the location of the command.
- When should I see a technician?
- If this error occurs inside a critical script or deployment pipeline, ask a developer or system administrator to review the environment setup.
Related errors
code'python' is not recognized as an internal or external command, operable program or batch filecodeERROR: Could not find a version that satisfies the requirement (from versions: none)codeTypeError: can only concatenate str (not "int") to strcodeerror: Your local changes to the following files would be overwritten by merge: Please commit your changes or stash themcodefatal: Authentication failed for 'https://github.com/user/repo.git/'codeModuleNotFoundError: No module named requests