Error Fix

How to Fix 'command not found'

The most common reasons shells cannot find commands and how to narrow them down quickly.

This error usually means the binary is not installed, is not in PATH, or belongs to a toolchain or virtual environment that your current shell session has not loaded.

Best Fixes

Check whether the command exists at all and whether the current shell PATH includes the directory that should contain it.

If the command comes from a virtual environment or version manager, verify that environment is active in the current session.

Avoid This

Do not add arbitrary PATH entries until you know which installation you want the shell to use.

Do not assume the command is missing globally if it only fails in one shell or script context.

Save commands, add notes, and build a Cheatbook with the fixes you want to keep handy.