Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Claude Code error

Claude Code: zsh: command not found: claude

Error message
zsh: command not found: claude

Status: WorkaroundLast verified 4 documented fixes2 sources

What it means

The install finished but the install directory is not in your PATH. Platform variants: bash: claude: command not found (Linux), 'claude' is not recognized as an internal or external command (Windows CMD), claude : The term 'claude' is not recognized as the name of a cmdlet (PowerShell). The installer reports Native installation exists but ~/.local/bin is not in your PATH.

Causes

  • ~/.local/bin (macOS/Linux) or %USERPROFILE%\.local\bin (Windows) missing from PATH
  • A terminal opened before the PATH change
  • Only the VS Code extension installed, which does not add claude to PATH

How to fix it

  1. Fix 1.

    Check that the binary exists.

    Snippet
    ls -la ~/.local/bin/claude
  2. Fix 2.

    For Zsh (macOS default), add the install directory to PATH and reload.

    Terminal
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
  3. Fix 3.

    For Bash on Linux, use ~/.bashrc; for Bash on macOS, use ~/.bash_profile.

    Terminal
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
    source ~/.bashrc
  4. Fix 4.

    Open a new terminal window and verify.

    Terminal
    claude --version

More Claude Code errors

All 18 Claude Code errors

FAQ

What does "zsh: command not found: claude" mean in Claude Code?

The install finished but the install directory is not in your PATH. Platform variants: bash: claude: command not found (Linux), 'claude' is not recognized as an internal or external command (Windows CMD), claude : The term 'claude' is not recognized as the name of a cmdlet (PowerShell). The installer reports Native installation exists but ~/.local/bin is not in your PATH.

How do I fix "zsh: command not found: claude"?

There are 4 documented fixes. Start with the first: Check that the binary exists.

Is this Claude Code error fixed?

Status: Workaround. No release removes the cause. The documented fixes work around it.

Sources

Last verified against 2 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.