Installation
This guide covers installing Claude Code on different systems.
System Requirements
| Requirement | Description |
|---|---|
| OS | macOS 10.15+, Ubuntu 20.04+/Debian 10+, Windows 10+ (via WSL2) |
| Hardware | 4GB+ RAM |
| Software | Node.js 18+ |
| Network | Internet connection required |
Installation Methods
NPM Install (Recommended)
npm install -g @anthropic-ai/claude-codeHomebrew
brew install --cask claude-codeScript Install
macOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexWinGet (Windows):
winget install Anthropic.ClaudeCodeVerify Installation
claude --versionVS Code Extension
- Open VS Code
- Press
Cmd+Shift+X(macOS) orCtrl+Shift+X(Windows/Linux) - Search “Claude Code”
- Click Install
First Launch and Authentication
claudeOn first launch, Claude Code guides you through authentication:
- Choose authentication method (Anthropic API or Claude Pro/Max subscription)
- Complete login in browser
- Return to terminal, authentication completes automatically
Troubleshooting
Node.js Version Too Low
node --version
# If below 18, upgrade using nvm
nvm install 18
nvm use 18Permission Issues
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcUpdate Claude Code
# NPM
npm update -g @anthropic-ai/claude-code
# Homebrew
brew upgrade --cask claude-code