Install Claude Code: Native, Homebrew, WinGet, or npm
Install Claude Code on macOS, Linux, WSL, or Windows with the official commands, then confirm the install with claude --version and claude doctor.
Updated · Markdown version
Run the installer that fits your operating system, open a fresh terminal, and type claude --version to check that the binary responds. Start a session with claude from inside your project folder, and log in when prompted.
Before installing
The setup documentation rechecked on 2026-11-25 lists macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, and Alpine Linux 3.19+. It requires an x64 or ARM64 machine, at least 4 GB RAM, internet access and availability in a supported country. On Alpine, install bash and curl before using the shell installer. Use a supported terminal shell and an eligible account.
Windows can run the native CLI or use WSL. WSL2 supports the documented sandbox; WSL1 and native Windows do not. Git is optional; Git for Windows enables Git Bash, while native Windows can use PowerShell without it. Match commands to the actual shell rather than assuming Windows means Bash.
Install steps
- Pick the install method for your system. The native installer is the recommended path on macOS, Linux, WSL and Windows. - Shell on macOS, Linux or WSL:
curl -fsSL https://claude.ai/install.sh | bash- PowerShell on Windows:irm https://claude.ai/install.ps1 | iex- Windows CMD:curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd- Homebrew:brew install --cask claude-code(theclaude-code@latestcask tracks the newest releases) - WinGet:winget install Anthropic.ClaudeCode- npm:npm install -g @anthropic-ai/claude-code@latest, which needs Node.js 22 or later - Open a new terminal window. The native installer prints no progress while it downloads, so wait for the prompt to return before you test.
- Run
claude --version. A working install prints a version number followed by(Claude Code). - Change into your project folder and run
claude. On first launch the session requests a sign-in. Pick a Console account or a Pro, Max, Ultra, Team or Enterprise plan, because free claude.ai access leaves out Claude Code. - Run
claude doctor. It prints read-only diagnostics for the install and your settings files without starting a session.
Check that it worked
Inside the session, type /help to list commands, and send a read-only question such as what does this project do?. If Claude answers from your files, the install and login both work. When the shell cannot locate claude, the launcher folder is missing from PATH; official PATH troubleshooting shows the OS-specific repair.
Pitfalls
- Wrong shell syntax. The error
The token '&&' is not a valid statement separatormeans you ran the CMD command in PowerShell. The error'irm' is not recognizedmeans you ran the PowerShell command in CMD. Match the command to the shell your prompt shows. - `claude` not found after install. Open a new terminal first. If it still fails, check that the native launcher directory is on PATH. On macOS and Linux the launcher is
~/.local/bin/claude. - Manual upgrades you forgot. Homebrew, WinGet and Linux package installs do not auto-update by default. Run
brew upgrade claude-code,winget upgrade Anthropic.ClaudeCode, or your package manager's upgrade command on a schedule. Otherwise you can stay on an old version. - Permission errors with npm. The docs advise against
sudo npm install -g, because Claude Code cannot update itself in an install that needs sudo. - Missing Git Bash on Windows. Without Git for Windows, shell commands run through PowerShell. If you install Git for Windows in a non-default location, set
CLAUDE_CODE_GIT_BASH_PATHin your settings file, as shown in the setup page. - Account type mismatch. A free claude.ai account can install the CLI but cannot log in to Claude Code. Check your plan before you troubleshoot the install.
When to use a skill instead
Setup runs once per machine, so a reusable skill has no role in these commands. Once the CLI runs, a skill becomes useful for repeated work. The agent-instruction-files skill covers instruction files for agents, which is the next thing to configure in a project after the first session works. Use ad-hoc prompting for a single question about your codebase, and a skill when you want the same steps applied every time. The skills and plugins listed for this query are not covered by the official install pages, so check their own documentation for setup.
FAQ
Why does the shell say `claude` is not found after install? The install directory is missing from PATH in that shell. Open a new terminal first; if the error persists, add the launcher directory to PATH, which on macOS and Linux is ~/.local/bin, following the official PATH troubleshooting.
Does Homebrew update Claude Code automatically? Not by default. Homebrew installs need brew upgrade claude-code, or brew upgrade claude-code@latest for the latest-channel cask. Setting CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1 makes Claude Code run the Homebrew or WinGet upgrade itself, as the setup page describes.
Which account types can log in to Claude Code? Pro, Max, Ultra, Team, Enterprise, and Console accounts can. The free claude.ai plan cannot log in to Claude Code, although the CLI can still be installed. Third-party providers such as Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry are also listed as options on the setup page.
Related skills in this catalog
Platform Score is our assessment under a published method. It is not a safety guarantee.
Related guides
- Install Codex CLI and Sign In
- What Is everything-claude-code (ECC)? Contents and Install
- Terminal AI Coding Assistants: Claude Code, Codex, and Gemini CLI
- Claude Code first session: a plan, edit, review loop
- Agentic Coding Tools: What They Are and How to Choose One
- What Is Claude Code and What It Can Touch on Your Machine
Sources
- https://code.claude.com/docs/en/setup (accessed 2026-11-25)
- https://code.claude.com/docs/en/quickstart (accessed 2026-11-25)
- https://code.claude.com/docs/en/troubleshoot-install#command-not-found-claude-after-installation (accessed 2026-11-25)