How to install Claude Code on Mac, Windows and Linux
The official one-line install commands, how to check it worked, how to sign in, and fixes for the common errors.
Last checked 18 November 2026
What you need
macOS 13 or later, Windows 10 (1809) or later, or Ubuntu 20.04, Debian 10 or Alpine 3.19 and later. At least 4 GB of RAM and an internet connection.
A paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account. The free plan does not include Claude Code.
Install it
Open a terminal and run the line for your system. It shows no progress while downloading.
curl -fsSL https://claude.ai/install.sh | bash
irm https://claude.ai/install.ps1 | iex
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
brew install --cask claude-code
winget install Anthropic.ClaudeCode
Check it worked and sign in
Open a new terminal window, then check the version and start a session in your project folder. Your browser opens to sign in the first time.
claude --version
cd your-project claude
Common errors
"claude: command not found": the install folder is not on your PATH. Open a new terminal, then run claude doctor for suggested fixes.
"The token '&&' is not a valid statement separator": you pasted the CMD command into PowerShell. Use the PowerShell line.
"'irm' is not recognized": you are in CMD. Use the CMD line, or open PowerShell.
On Windows, installing Git for Windows is recommended so Claude Code can use its Bash tool. Without it, Claude Code uses PowerShell.
Prefer not to use a terminal?
The Claude desktop app has a Code tab that runs the same agent with a visual interface, and there are extensions for VS Code and JetBrains.