The Decoder / One term

“claude: command not found”: what it means and how to fix it

The install finished but your terminal cannot find the program, almost always because its folder, ~/.local/bin, is not on your PATH yet. Open a new terminal window first; if that fails, add the folder to PATH once.

By Mstimaj Numbers checked 6 November 2026 Updated 6 November 2026 Level Technical Tool Claude

Sign in to save your place and mark this done. Free, no card.

A dark terminal window with one red line of text, and beside it a closed drawer with a small folder inside it

Nothing is broken. The installer put Claude Code in a folder, and your shell does not look in that folder when you type a command. The first thing to try is simply to close the terminal and open a new one, because a fresh window reads the updated settings. If it still says not found, the fix is two lines that add the folder to your PATH, run once. Then claude –version should print a version number.

Key facts

  • 1folder the installer uses: ~/.local/bin on Mac and Linux, %USERPROFILE%\.local\bin on Windows
  • 4spellings of the same error, one per shell: zsh, bash, Command Prompt, PowerShell
  • 2commands that fix it permanently on a Mac, an echo and a source
  • 0reinstalls needed; the program is already there, your shell just cannot see it
  • code.claude.com, Troubleshoot installation and login, sections 'command not found: claude after installation' and 'Verify your PATH', read 6 November 2026

What does the error actually mean?

Your shell keeps a list of folders where it looks for programs. That list is called the PATH. When you type a word and press Enter, the shell walks the list, and if the word is not a program in any of those folders, it says command not found. The Claude Code installer places the program at ~/.local/bin/claude on a Mac or Linux, and at %USERPROFILE%\.local\bin\claude.exe on Windows. If that folder is not on the list, the program exists and the shell cannot see it. The installer even tells you this at the end, under Setup notes, with the line Native installation exists but ~/.local/bin is not in your PATH. It prints the fix; it does not apply it for you.

The same error, as each shell spells it
Where you typed it What it says
Mac (zsh) zsh: command not found: claude
Linux (bash) bash: claude: command not found
Windows Command Prompt 'claude' is not recognized as an internal or external command
Windows PowerShell claude : The term 'claude' is not recognized as the name of a cmdlet

The first thing to try

Close the terminal window and open a new one, then type claude --version. A working installation prints a version number followed by (Claude Code). This works more often than it should, because the installer updates your shell’s settings file and a terminal that was already open never re-reads it. If a new window still says not found, check that the program is really there before touching anything else. On a Mac or Linux: ls -la ~/.local/bin/claude. A listing means it is installed and the problem is the PATH. No such file or directory means the install did not happen, and the quickstart’s install line is what you need instead.

The permanent fix on a Mac or Linux

Two commands, run once, in the terminal. On a Mac, where the shell is zsh: echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc and then source ~/.zshrc. On Linux, where the shell is usually bash, the same two lines with ~/.bashrc in place of ~/.zshrc. The first line saves the setting for every future terminal and prints nothing when it works. The second applies it to the window you are in. If the first line answers permission denied, your user cannot write to that settings file; chmod u+w ~/.zshrc makes it writable, then run the two lines again.

Steps to fix it, by platform STEPS TO FIX IT, BY PLATFORM Mac (new window, then 2 lines) 3 steps Linux (new window, then 2 lines) 3 steps Windows (new window, then PATH in Settings) 2 steps
Counting a new terminal window as step one. Nobody needs to reinstall.

On Windows

The wording changes with the window. Command Prompt says ‘claude’ is not recognized as an internal or external command; PowerShell says The term ‘claude’ is not recognized as the name of a cmdlet. Same cause. First, open a new window and try again. If that fails, type where.exe claude: a path means the program is there and the folder needs adding to PATH, which you do once in Settings, under Environment Variables, by adding the .local\bin folder in your user directory. The line Could not find files for the given pattern(s) means it is not installed. One Windows-only case: if the error began right after Claude Code updated itself, the documentation has a separate fix for restoring claude.exe from its backup.

How to confirm it is fixed

claude --version prints the version. claude doctor, run from the shell, checks the whole installation and tells you what it found. If the version prints but the program misbehaves, the problem has moved on from PATH and the general troubleshooting page is the next stop. If you installed Claude Code only as the VS Code extension, note that the extension keeps a private copy for its own panel and never adds claude to your terminal; the standalone install is a separate step.

Ask what did not make sense

Comments go through our own form and are read before they appear. Links are not allowed; describe it in words.

Comments are read before they appear.

The newsletter

Get the next term.

One email when something goes up. The argument, the film and the term, nothing else. One click to leave.

Have a question now? Ask Mstimaj, she knows the archive.