Fix "command not found" on Linux
command not foundNo such file or directorynot in PATH"command not found" means the shell couldn't locate that program. Either it isn't installed, or it is but isn't on your PATH. Here's how to tell which and fix it.
Is it installed at all?
Search for the binary. If which finds nothing but the file exists somewhere, it's a PATH problem; if it's nowhere, install it:
which toolname
ls /usr/bin/toolname /usr/local/bin/toolname 2>/dev/null
Install it
# Debian/Ubuntu
apt install package
# RHEL/Alma/Rocky
dnf install package
Installed but "not found"? Fix your PATH
If the binary exists but the shell can't see it, its folder isn't on PATH. Add it (and persist it in your shell profile):
export PATH=":/usr/local/bin"
# make it permanent: add that line to ~/.bashrc
If /usr/local/bin/toolname works but toolname alone doesn't, it's definitely PATH — not a missing install.
Not found = not installed, or not on PATH. which/ls to tell which, then install the package or add its folder to PATH.
A clean VDS to work on
Our VDS plans give you full root to install whatever you need, on protected NVMe in Frankfurt.
Frequently asked questions
What does "command not found" mean on Linux?
The shell couldn't find that command in any folder on your PATH. Either the program isn't installed, or it is but its directory isn't on your PATH.
How do I know if it's installed or just not on PATH?
Run which toolname and look for the binary with ls in common bin folders. If the file exists but which doesn't find it, it's a PATH issue; if it doesn't exist, install the package.
How do I add something to my PATH permanently?
Add export PATH="$PATH:/your/dir" to your ~/.bashrc (or ~/.profile), then reload it. That makes the directory available in every new shell session.
Related articles
Fix SSH "Connection refused" / "Connection timed out"
SSH "connection refused" vs "timed out" — what each means and the exact steps to fix them.
Read fix Linux & VPSFix "Permission denied" on Linux (chmod & chown Explained)
"Permission denied" on a script or file? Understand chmod/chown and fix it the right way.
Read fix Linux & VPSHow to Check CPU, RAM & Disk Usage on a Linux Server
The essential commands to check CPU, RAM and disk on Linux — and find what's eating them.
Read fix