Claude Code Command Not Found on Mac, Windows and Linux: Fix the PATH
What zsh: command not found: claude means, whether to wait, and what to check first.
Language: English · 日本語版
Wait or fix?
Fix your PATH; reinstalling is rarely the answer. When the install finished but the claude command is not found, the usual reason is that the install folder is not in your PATH. The native installer places the program at ~/.local/bin/claude on macOS and Linux, or in .local\bin under your user profile on Windows. The installer notices this case and prints a "Setup notes" line with the fix, but it does not change PATH itself. The PATH fix is permanent, so you apply it once.
Messages you may see
zsh: command not found: claudebash: claude: command not found'claude' is not recognized as an internal or external commandclaude : The term 'claude' is not recognized as the name of a cmdlet
The exact wording changes a little between Claude Code versions and providers.
What the message means
The wording depends on the shell: zsh on macOS, bash on Linux, and Command Prompt or PowerShell on Windows each print their own form of "not found" or "not recognized". One case catches many people: the VS Code extension bundles a private copy of the CLI for its own chat panel and does not add it to PATH. If you only installed the extension, ~/.local/bin/claude does not exist, and you need the standalone install to run claude from a terminal. On Windows, if the error started right after an update, the official page has a separate fix that restores claude.exe from its backup.
Common causes
- The install folder (
~/.local/bin, or.local\binunder your Windows user profile) is not in PATH. - A terminal window opened before the change keeps its old PATH, and a terminal inside an editor takes its PATH from the editor.
- The PATH line went to another shell's file. For example, Terminal on macOS starts Bash as a login shell, which ignores
~/.bashrc. - Only the VS Code extension is installed, not the standalone CLI.
Check in this order
- Check that the program is there:
ls -la ~/.local/bin/claudeon macOS and Linux. On Windows, look forclaude.exein.local\binunder your user profile. If it is missing, install Claude Code, or check for another install method such as npm or Homebrew. - Check PATH:
echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin". In PowerShell, run$env:PATH -split ';'and look for.local\bin. - If it is missing, add it for your shell. For Zsh:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrcand thensource ~/.zshrc. Use~/.bashrcfor Bash on Linux and~/.bash_profilefor Bash on macOS. On Windows, add the folder to your User PATH and restart the terminal. - Open a new terminal window, or quit and reopen your editor, then run
claude --version. - If it is still not found, run
echo $0to see your shell, and confirm the line is in that shell's file withgrep -n '.local/bin' ~/.zshrc, using your shell's file name.
We took the fixes from the official pages below and put them in order, with the quickest and most likely ones first.
How it differs from similar errors
- "syntax error near unexpected token `<'" during install means the install command downloaded a web page instead of the install script, so nothing was installed yet.
- "running scripts is disabled on this system" is a Windows PowerShell security error when installing or running through npm, not a PATH problem.
Official sources
- Troubleshoot installation and login: command not found: claude after installation (checked 2026-11-20)
- Troubleshoot installation and login: Verify your PATH (checked 2026-11-20)
Unofficial page. Not affiliated with, endorsed by, or sponsored by Anthropic, PBC. Claude and Claude Code are trademarks of Anthropic, PBC. Messages and fixes change with updates, so read the official pages as well.