How to Install Claude Code on Mac, Windows, and Linux
macOS — Native Installer
Download the installer from Anthropic's official site or use Homebrew:
brew install anthropic/claude-code/claude-code
The Homebrew version stays updated automatically. The native installer gives you a .pkg file you double-click to install. Both end up with claude in your PATH.
Windows — Native Installer
Download the .exe installer from the Claude Code website. Run it — it installs to %LOCALAPPDATA%ProgramsClaude Code and adds itself to your PATH. Open a new PowerShell or CMD window and claude will be available.
If you use Windows Subsystem for Linux (WSL2), install the Linux version inside WSL rather than the Windows installer — it works better with the Linux toolchain.
Linux — Native Installer
Download the Linux tarball from the Claude Code website:
tar -xzf claude-code-linux.tar.gz
sudo mv claude /usr/local/bin/
Or use the install script if Anthropic provides one. Verify it is accessible:
claude --version
npm Option
If you have Node.js installed, you can install via npm:
npm install -g @anthropic-ai/claude-code
This works across all operating systems. Use this if you want Claude Code managed through your Node.js toolchain or if you are on an OS that does not have a native installer yet.
First Run
Run claude in any terminal. It will open a browser window for authentication if this is your first time. Log in with your Anthropic account. After authentication, the CLI is ready to use.
Once authenticated, you can run claude --model opus-4.7 to specify which model to use, or leave it off to use your account default.
Get Started with Claude Code
Start building with Claude Code today. Free to download, powerful enough for production.