Advertise hereReach developers building with AI coding agents. →

Based on Anthropic’s official docs, checked

How to install Claude Code on macOS, Linux and Windows

Claude Code installs with one command on macOS, Linux and Windows. Anthropic recommends its native installer, which updates itself in the background; Homebrew, WinGet, Linux package managers and npm also work but update manually. This guide covers each method, Windows and WSL choices, how to check the install and how to sign in, based on Anthropic’s setup docs checked October 22, 2026.

  1. 1. Check the system requirements

    macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+ or Alpine Linux 3.19+, with 4 GB+ RAM on an x64 or ARM64 processor and an internet connection. Shells: Bash, Zsh, PowerShell or CMD.

  2. 2. Run the native installer (recommended)

    On macOS, Linux or WSL, run the shell installer. On Windows, use the PowerShell or CMD command instead; you do not need to run as Administrator. The installer shows no progress while it downloads.

    curl -fsSL https://claude.ai/install.sh | bash
  3. 3. Or use a package manager

    Homebrew: brew install --cask claude-code (stable channel, about a week behind) or claude-code@latest. Windows: winget install Anthropic.ClaudeCode. npm: npm install -g @anthropic-ai/claude-code, which needs Node.js 22 or later; don’t use sudo. These installs do not auto-update.

    brew install --cask claude-code
  4. 4. Verify the install

    Open a new terminal and run claude --version; a working install prints a version number. For a fuller check, claude doctor prints read-only installation and settings diagnostics.

    claude --version
    claude doctor
  5. 5. Start Claude Code and sign in

    Open a terminal in your project and run claude, then follow the browser prompts. Claude Code needs a Pro, Max, Team, Enterprise or Console account; the free claude.ai plan does not include it. Third-party providers such as Amazon Bedrock also work.

    claude

Install commands for Windows

PowerShell (your prompt shows PS C:\): irm https://claude.ai/install.ps1 | iex

CMD: curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

If you see “The token && is not a valid statement separator”, you are in PowerShell, not CMD. If “irm is not recognized”, you are in CMD, not PowerShell.

Native Windows or WSL?

Native Windows needs nothing extra. Git for Windows is optional: with it, Claude Code uses Git Bash for its Bash tool; without it, it runs commands through PowerShell. Sandboxing is not supported on native Windows.

WSL 2 supports sandboxing and suits Linux toolchains. Install and launch claude inside the WSL terminal with the Linux command. WSL 1 works but without sandboxing.

Updates

Native installs update automatically in the background; run claude update to update now. Homebrew (brew upgrade claude-code), WinGet (winget upgrade Anthropic.ClaudeCode) and npm (npm install -g @anthropic-ai/claude-code@latest) need manual updates.

Alpine and other musl-based systems need bash, curl, libgcc, libstdc++ and ripgrep installed first.

Tips

Next steps

Verified MCP servers for Claude

→

Generate an MCP config for Claude

→

Claude Code hub

→

Claude Code vs OpenAI Codex: documented features compared

→

Cursor vs Claude Code: documented features compared

→

Claude Code vs GitHub Copilot: documented features compared

→

Google Antigravity vs Claude Code: documented features compared

→

How to add an MCP server to Codex

→

How to add an MCP server to Cursor

→

How to add an MCP server to GitHub Copilot in VS Code

→

How to add an MCP server to Google Antigravity

→

How to migrate from Gemini CLI to Antigravity CLI

→

Portable agent skills: one SKILL.md for every coding agent

→

Safe “always allow” rules for Claude Code and Codex CLI

→

GitHub Copilot CLI yolo mode: --allow-all and safer tool rules

→

Codex sandbox modes and approval policies explained

→

How to install the OpenAI Codex CLI

→

Claude Code auto mode: what runs, what gets blocked, how to turn it off

→

Agent Skills moves to the Agentic AI Foundation: what changes

→

MCP security: the risks in MCP servers and how to lock them down

→

Claude Code in VS Code: install, shortcuts and CLI differences

→

What is AGENTS.md? The open instruction file for coding agents

→

Claude Code on Windows: native, WSL and common errors

→

Codex skills: create, install and use SKILL.md skills in Codex

→

GitHub Copilot CLI: install, sign in and start using it

→

Cursor Agent SDK: build, test and deploy agents as code

→

GPT-6.1 Terra in Codex and the API: setup, pricing and limits

→

MCP OAuth: connect a remote MCP server in Claude Code, Codex and Cursor

→

Codex config.toml: location, precedence and the settings to change

→

Codex on Windows: native sandbox setup, WSL and fixes

→

Antigravity CLI (agy): install, sign in, modes and commands

→

Google Antigravity on Windows: install, WSL, sandbox and fixes

→

GitHub Copilot coding agent (now cloud agent): how to use it

→

GitHub Copilot agent mode: how to use it in your IDE

→

Frequently asked questions

Run curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Then run claude --version to check it.

Sources