Installation & Setup
Get Claude Code running on macOS, Windows, or Linux in minutes.
Claude Code is a CLI tool that runs in your terminal. Getting it installed and logged in takes about five minutes — this lesson walks you through exactly that.
Requirements
Before you install, make sure your machine qualifies. Claude Code needs a supported OS, enough RAM, a network connection, and a paid Anthropic account.
- Operating system: macOS 13+, Windows 10 1809+ / Server 2019+, Ubuntu 20.04+, Debian 10+, or Alpine 3.19+
- Hardware: 4 GB+ RAM, x64 or ARM64 processor
- Network: a live internet connection (Claude Code calls Anthropic's servers for every request)
- Account: a Claude Pro, Max, Team, Enterprise, or Anthropic Console subscription — the free Claude.ai plan does not include CLI access
- Country: your location must be in an Anthropic-supported country (anthropic.com/supported-countries)
Install the CLI
The recommended method is the native installer — a single command that downloads the binary, adds it to your PATH, and sets up auto-updates. Pick the command for your platform:
# macOS, Linux, or WSL
curl -fsSL https://claude.ai/install.sh | bash# Windows PowerShell
irm https://claude.ai/install.ps1 | iex# Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdPrefer a package manager? Homebrew and WinGet are supported alternatives:
# macOS — Homebrew
brew install --cask claude-code
# Windows — WinGet
winget install Anthropic.ClaudeCodeAuthenticate
Once installed, navigate to any project folder and run 'claude'. Claude Code will open a browser window and ask you to log in with your Anthropic account. Follow the prompts — it takes about thirty seconds.
cd your-project
claudeVerify your setup
After installation and login, confirm everything is working with two quick commands:
# Check the installed version
claude --version
# Run a full diagnostic (checks auth, PATH, updates, and more)
claude doctorIf something goes wrong
Two issues account for the vast majority of post-install problems:
- 'command not found: claude' — the install directory is not in your PATH. On macOS/Linux, add 'export PATH="$HOME/.local/bin:$PATH"' to your ~/.zshrc or ~/.bashrc, then restart your terminal. On Windows, add '%USERPROFILE%\.local\bin' to your User PATH in System Settings.
- Install script returns HTML or a 403 error — your network or region may be blocking claude.ai. Try Homebrew ('brew install --cask claude-code') on macOS or WinGet ('winget install Anthropic.ClaudeCode') on Windows as an alternative, or retry on a different network.
- 403 Forbidden after login — check that your subscription is active at claude.ai/settings. If you use the Anthropic Console, confirm your account has the 'Claude Code' or 'Developer' role.