Skip to content

Installation

This guide covers installing Claude Code on different systems.

System Requirements

RequirementDescription
OSmacOS 10.15+, Ubuntu 20.04+/Debian 10+, Windows 10+ (via WSL2)
Hardware4GB+ RAM
SoftwareNode.js 18+
NetworkInternet connection required

Installation Methods

NPM Install (Recommended)

npm install -g @anthropic-ai/claude-code

Homebrew

brew install --cask claude-code

Script Install

macOS, Linux, WSL:

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

WinGet (Windows):

winget install Anthropic.ClaudeCode

Verify Installation

claude --version

VS Code Extension

  1. Open VS Code
  2. Press Cmd+Shift+X (macOS) or Ctrl+Shift+X (Windows/Linux)
  3. Search “Claude Code”
  4. Click Install

First Launch and Authentication

claude

On first launch, Claude Code guides you through authentication:

  1. Choose authentication method (Anthropic API or Claude Pro/Max subscription)
  2. Complete login in browser
  3. 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 18

Permission Issues

mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Update Claude Code

# NPM
npm update -g @anthropic-ai/claude-code

# Homebrew
brew upgrade --cask claude-code