What you need
- A Claude Pro, Max, Team, Enterprise or Console account (the free plan doesn’t include Claude Code);
- to be in a country or region Anthropic supports;
- Mac: macOS 13 or later; Windows: WSL installed first.
1. Install
Open the terminal (Windows: Ubuntu in WSL), paste this command and press Enter:
curl -fsSL https://claude.ai/install.sh | bashIt shows no progress while installing — wait for it to finish. Then close the terminal and open it again, and check:
claude --versionA version number (such as 2.1.211 (Claude Code)) means it’s installed. Installed this way, Claude Code updates itself in the background.
2. Log in
Type claude in the terminal and press Enter. Log in to your Claude account in the browser as prompted, authorize, then return to the terminal.
Stuck?
claude: command not found?
Reopen the terminal after installing. Still failing? Run claude doctor (if it runs) or see the PATH section of the official setup guide.
The browser didn't open?
The terminal prints a login URL — open it in a browser.
Can I install it on Windows without WSL?
Claude Code itself supports native Windows, but this setup’s scripts need Linux tools, so the guide uses WSL throughout.