Claude Code Installation
Prerequisites, installation methods, and platform-specific notes
Claude Code installs as a standalone binary or through package managers. The native binary approach requires no runtime dependencies and works across macOS, Linux, and Windows via WSL.
Prerequisites
- Operating system macOS 10.15+, Linux (Ubuntu 20.04+, Debian 10+), or Windows 10+ with WSL
- RAM 4 GB minimum
- Node.js Version 18+ (only required for npm installation method)
- Internet Required for authentication and API access
Installation methods
Native Binary (Recommended)
curl -fsSL https://claude.ai/install.sh | bashThis approach works on macOS, Linux, and WSL without additional dependencies. The installer downloads a pre-compiled binary and adds it to the system PATH.
npm
npm install -g @anthropic-ai/claude-codeDo not use sudo with npm global installs. Permission errors indicate a PATH configuration issue, not a need for elevated privileges.
Homebrew (macOS)
brew install --cask claude-codeUsing multiple installation methods simultaneously can cause conflicts. The native binary is recommended to avoid symlink issues between Homebrew and npm.
Windows considerations
Claude Code does not run natively on Windows. Development on Windows requires Windows Subsystem for Linux (WSL 2 recommended).
- Install WSL with a supported distribution
- Open a WSL terminal
- Use the standard native binary installation within the WSL environment
Verifying installation
After installation, verify the setup:
claude --version
claude doctorThe doctor command runs a diagnostic check, identifying configuration issues and suggesting fixes. It verifies the installation type, Node.js compatibility (if applicable), and environment configuration.