Chromebook & Linux

Linux terminal says 'command not found'

This means the program isn't installed or isn't in the system's search path, not that something is broken. Installing the right package usually solves it in one step.

Difficulty
Easy
Time
5–15 minutes
DIY cost
$0

Symptoms

  • 'bash: [command]: command not found' error
  • Command worked on another computer
  • Recently followed a tutorial referencing the command
  • Command exists but still not found

Likely causes

  • CommonProgram isn't installedNot all commands come preinstalled; many need to be added via the package manager.
  • CommonCommand name is slightly different on your distributionPackage and command names can vary between Ubuntu, Fedora, Arch, etc.
  • PossibleProgram installed but not added to PATHSome manually installed programs need their location added to the shell's PATH variable.
  • PossibleTypo in the commandA small typo produces the same error as a missing program.

What to do

  1. Double check the spelling of the command for typos.
  2. Search your distribution's package manager for the program: 'apt search [name]' or 'dnf search [name]'.
  3. Install it with 'sudo apt install [package]' or the equivalent for your distribution.
  4. If it was installed manually (not via package manager), confirm its folder is included in your PATH with 'echo $PATH'.
  5. Try running the program with its full file path to confirm it exists and runs at all.
  6. Search online for '[distribution name] install [program name]' if the package name differs from the command name.

Tools and parts

  • Terminal access

When to call a pro

Not applicable; this is a straightforward installation step.

Safety

Generally low risk

Generally low risk for a careful person. Stop if anything looks different from what this guide describes.

Related guides

Operator provides AI-generated troubleshooting information. It can be wrong. For safety-critical, electrical, gas, structural, medical, automotive safety, or other high-risk problems, consult a qualified professional.