Requirements
-
Node.js 18 or later — Claude Code’s package requires
node >= 18.0.0. Check your version: - An Anthropic account — required for authentication. Sign up at claude.ai.
Install Claude Code
claude binary globally so it is available from any directory.
Verify the installation
First-time setup and authentication
The first time you runclaude, it walks you through authentication:
Claude Code stores authentication tokens in your system keychain (macOS) or in a secured local file (Linux, Windows). You will not need to re-authenticate on subsequent runs.
Update Claude Code
To update to the latest version, run the built-in install command from inside Claude Code:Platform notes
macOS
Claude Code is supported on both Apple Silicon (arm64) and Intel (x64) Macs. No platform-specific steps are required beyond the standard npm install. If you installed Node.js via Homebrew, the global npm bin directory ($(npm bin -g)) is typically already on your PATH.
Linux
Claude Code runs on x64, arm64, and arm (32-bit) Linux. It is tested on Debian/Ubuntu, Fedora/RHEL, Alpine, and Arch-based distributions. After a global npm install, add the npm global bin directory to your shell’sPATH if it is not already there. For bash:
Windows
Claude Code is supported on Windows (x64 and arm64). Theclaude binary is installed to %APPDATA%\npm by default. Ensure this path is in your PATH environment variable.
Claude Code installs its native binary to %USERPROFILE%\.local\bin\claude.exe on Windows.
WSL (Windows Subsystem for Linux)
Claude Code works inside WSL environments. Install it within your WSL distribution using the Linux instructions above. Theclaude binary will be available in your WSL shell.
Alternative install methods
Native installer
Claude Code also supports a native installation that does not require npm. Run this inside an existing Claude Code session:/install command downloads and installs the native Claude Code binary for your platform.
mise or asdf
Claude Code can be managed with mise or asdf as a Node.js global tool. Install Node.js 18+ via mise/asdf first, then use npm to install Claude Code globally.Troubleshooting
claude: command not found after install
The global npm bin directory is not on your PATH. Find it and add it:
~/.bashrc, ~/.zshrc, etc.) using the PATH export shown in the Linux section above, then reload your shell.
Permission errors during install
Avoid runningnpm install -g with sudo. Instead, configure npm to use a directory you own:
Another process is installing Claude
If you seeCould not install - another process is currently installing Claude, wait a moment and try again. If the error persists, use the --force flag:
Node.js version is too old
Claude Code requires Node.js 18 or later. Check your version withnode --version. If you need to upgrade, use nvm, mise, or your system package manager.