Discover solutions to common issues with Claude Code installation and usage.
npm
. Try:
npm config set os linux
before installationnpm install -g @anthropic-ai/claude-code --force --no-os-check
(Do NOT use sudo
)exec: node: not found
when running claude
, your WSL environment may be using a Windows installation of Node.js. You can confirm this with which npm
and which node
, which should point to Linux paths starting with /usr/
rather than /mnt/c/
. To fix this, try installing Node via your Linux distribution’s package manager or via nvm
.
PATH
problems may prevent access to claude
.
You may also encounter permission errors if your npm global prefix is not user writable (eg. /usr
, or /usr/local
).
~/.local/bin/claude
.
~/.claude/local/
and sets up an alias in your shell configuration. No sudo
is required for future updates.
After migration, restart your shell, and then verify your installation:
On macOS/Linux/WSL:
/permissions
command. See Permissions docs.
/logout
to sign out completelyclaude
and complete the authentication process again/compact
regularly to reduce context size.gitignore
file/bug
command within Claude Code to report problems directly to Anthropic/doctor
to check the health of your Claude Code installation