← Blog

How-to4 min read

How to install Claude Code on macOS, Windows and Linux

The official install commands for every platform, how to check the install and sign in, and how Mirasim installs Claude Code for you and runs it next to Codex.

Mirasim's Get started: install Claude Code, Codex or OpenCode with one clickMirasim's Get started: install Claude Code, Codex or OpenCode with one click

The short answer

Run Anthropic's installer in a terminal, then run claude in your project and sign in. The native installer updates itself in the background. You need a Claude Pro, Max, Ultra, Team or Enterprise plan, or an Anthropic Console account; the free claude.ai plan doesn't include Claude Code. Claude Code is only available in Anthropic's supported countries.

macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell
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 (does not auto-update; run brew upgrade claude-code)
WinGet
winget install Anthropic.ClaudeCode (does not auto-update)
npm
npm install -g @anthropic-ai/claude-code (needs Node.js 22 or later; don't use sudo)

Anthropic also publishes apt, dnf and apk packages for Debian, Fedora, RHEL and Alpine.

System requirements

  • macOS 13.0 or later; Windows 10 1809 or later, or Windows Server 2019 or later; Ubuntu 20.04+, Debian 10+ or Alpine Linux 3.19+.
  • 4 GB of RAM or more, an x64 or ARM64 processor, and an internet connection.
  • On Windows, run Claude Code natively from PowerShell or CMD, or inside WSL 2. Git for Windows is optional: with it, Claude Code uses Git Bash for shell commands; without it, PowerShell.

Check the install and sign in

bash
claude --version   # prints a version number
claude doctor      # install health and settings, without starting a session
claude             # start in your project and sign in in the browser

If claude isn't found, see the next section. If sign-in fails, Anthropic's troubleshooting page covers permission and network errors. Claude Code can also run on Amazon Bedrock, Google Cloud or Microsoft Foundry instead of a Claude account.

Fix claude: command not found

If the install finished but your terminal can't find claude, the install folder isn't in your PATH. The native installer puts claude in the .local/bin folder in your home folder (%USERPROFILE%\.local\bin\claude.exe on Windows). It says so under "Setup notes" in its output, but it doesn't change your PATH for you.

WhereWhat the error looks like
macOSzsh: command not found: claude
Linuxbash: claude: command not found
Windows CMD'claude' is not recognized as an internal or external command
PowerShellclaude : The term 'claude' is not recognized as the name of a cmdlet

Add the folder to your PATH once, then open a new terminal window and run claude --version:

macOS (zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
Linux (bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
macOS (bash)
The same line, written to ~/.bash_profile instead of ~/.bashrc
Windows PowerShell
[Environment]::SetEnvironmentVariable('PATH', [Environment]::GetEnvironmentVariable('PATH', 'User') + ";$env:USERPROFILE\.local\bin", 'User')

Still not found? Check these:

  • A window that was already open keeps its old PATH, and a terminal inside an editor takes its PATH from the editor. Open a new window, or quit and reopen the editor.
  • You only installed the VS Code extension. It bundles its own copy of Claude Code for its chat panel and doesn't add claude to your PATH. Run the installer above to use claude in a terminal.
  • On Windows, right after an update: Claude Code renames the old claude.exe to a backup that starts with claude.exe.old. before moving the new one in. If claude.exe is missing, rename the newest backup back to claude.exe, or run the installer again.
  • Installed with npm and claude prints "claude native binary not installed": npm 12 skips the step that puts the binary in place, and --omit=optional skips the download. Anthropic's troubleshooting page has the fix for each.
  • On Windows, claude opens the Claude desktop app: an older Claude Desktop registers its own Claude.exe ahead of the CLI. Update Claude Desktop.

Mirasim looks in that same .local/bin folder even when it isn't in your PATH, so the app finds a fresh Claude Code install right away. You still need the fix above to run claude in your own terminal.

Let Mirasim install it for you

  1. Open Get started

    Claude account? It suggests Claude Code

  2. Press Install

    Mirasim runs Anthropic's own installer

  3. Sign in, then start

    Run Claude Code in a pane, next to Codex or others

  • Any agent not installed yet can be installed from Agent Config, and Settings shows each agent's installed version next to the latest one.
  • If you already installed Claude Code yourself, Mirasim runs that copy with your existing sign-in.
  • Follow the same sessions from the Mirasim phone apps, or share them with teammates.

Questions

Is Claude Code free?
The tool installs for free, but using it needs a paid Claude plan, an Anthropic Console account, or a supported cloud provider. The free claude.ai plan doesn't include it.
Should I use npm or the native installer?
Anthropic's instructions lead with the native installer, which updates itself. npm also works with Node.js 22 or later.
Is there a Claude Code desktop app?
Yes, the Code tab of the Claude Desktop app. Mirasim is a separate desktop app that runs the Claude Code CLI next to other agents.

Sources

Install commands and requirements were checked against Anthropic's setup guide, code.claude.com/docs/en/setup, on November 9, 2026. The command-not-found fixes were checked against its install troubleshooting page, code.claude.com/docs/en/troubleshoot-install, on November 24, 2026. Check those pages for the latest.

Keep reading