How to Install Claude Code on Mac and Windows

Install Claude Code on Mac and Windows with one command: curl on macOS, PowerShell on Windows. Needs macOS 13+ or Windows 10 1809+ and a paid plan.

By Archit Tamrakar · LinkedIn · · 9 min read

You install Claude Code with one pasted command: curl -fsSL https://claude.ai/install.sh | bash on a Mac, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Both come from Anthropic's setup page, which requires macOS 13.0 or later, or Windows 10 version 1809 or later. You also need a paid account, because the same page says the free claude.ai plan does not include Claude Code.

Quick answer: open a terminal, paste the command for your system, wait for the "Claude Code successfully installed!" message, then run claude and sign in. Free? The installer is free, but Claude Code needs a Pro, Max, Team, Enterprise or Console account. The installer shows no progress while it downloads, so wait.

What do you need before you start?

You need a supported computer, an internet connection and a paid Claude account. Anthropic's system requirements list macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, 4 GB or more of RAM, and an x64 or ARM64 processor. Claude Code is also limited to Anthropic supported countries.

For the account, Anthropic's setup page says Claude Code requires a Pro, Max, Team, Enterprise or Console account. The quickstart describes Console as API access with pre-paid credits. Cloud providers such as Amazon Bedrock also work, but that is mainly for organisations.

Checklist:

  • A Mac running macOS 13.0 or later, or a PC running Windows 10 version 1809 or later.
  • A Pro, Max, Team, Enterprise or Console login.
  • A terminal. The steps below show how to open one.
  • Optional on Windows: Git for Windows.

How do you install Claude Code on Mac? (Method 1: the native installer)

On a Mac, open Terminal, paste one curl command and press Enter. This is the method Anthropic labels "Native Install (Recommended)" on its setup page. The steps below follow Anthropic's terminal guide.

  1. Press Cmd + Space to open Spotlight Search, type Terminal, and press Enter. A window with a blinking cursor opens.
  2. Copy this line, paste it into the window with Cmd + V, and press Enter:
curl -fsSL https://claude.ai/install.sh | bash
  1. Wait. The guide says the command shows no progress while it downloads, so leave the window open. When it finishes you should see "Claude Code successfully installed!"
  2. Open a new Terminal window and run claude --version. A working install prints a version number such as 2.1.211 (Claude Code).
  3. Type claude and press Enter.
  4. Your browser opens. Sign in with your Claude account. When login completes, the terminal shows Login successful and asks you to press Enter to continue (authentication docs).

If the browser does not open, press c in the terminal to copy the login URL, then paste it into your browser.

For day-to-day use, the guide notes that you cannot click in the terminal. Use the arrow keys, press Esc to interrupt Claude, and type /help to see commands.

How do you install Claude Code on Windows? (Method 1: PowerShell)

On Windows, open PowerShell and paste irm https://claude.ai/install.ps1 | iex. You do not need to run as Administrator, and Git for Windows is optional. The steps follow Anthropic's terminal guide.

  1. Optional: install Git for Windows from git-scm.com/downloads/win. Accept the defaults on each screen. When you see "Adjusting your PATH environment," keep the recommended option. Git provides Git Bash, which Claude Code uses for its Bash tool. Without Git, Claude Code uses PowerShell instead.
  2. Press Win + X and select Windows PowerShell (or Terminal).
  3. Check your prompt. In PowerShell it starts with PS C:\Users\YourName>. In CMD it has no PS.
  4. Paste this line with Ctrl + V or a right-click, then press Enter:
irm https://claude.ai/install.ps1 | iex
  1. Wait for "Claude Code successfully installed!" The command shows no progress until it ends.
  2. Open a new PowerShell window and run claude --version to confirm a version number prints.
  3. Run claude. A browser window opens for you to sign in.

Using CMD instead? Anthropic gives a separate command for Command Prompt:

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

Do not mix the two. Anthropic's troubleshooting page says that if you see The token '&&' is not a valid statement separator, you are in PowerShell, not CMD. If you see 'irm' is not recognized, you are in CMD, not PowerShell.

Native Windows or WSL? The setup page says sandboxing is not supported on native Windows. It is supported on WSL 2. To use WSL, open your WSL terminal and run the Linux installer there, not from PowerShell or CMD.

Can you install Claude Code another way (Homebrew, WinGet, npm or the desktop app)?

Yes. Anthropic documents Homebrew for Mac, WinGet for Windows, npm for both, and a desktop app that skips the terminal. The main trade-off is updates: native installs update themselves, while Homebrew and WinGet installs do not.

Method 2: Homebrew (Mac). Run brew install --cask claude-code. Per the setup page, this cask tracks the stable channel, which is typically about a week behind. Use claude-code@latest for new versions as soon as they ship. Upgrade with brew upgrade claude-code or brew upgrade claude-code@latest.

Method 2: WinGet (Windows). Run winget install Anthropic.ClaudeCode. Upgrade later with winget upgrade Anthropic.ClaudeCode.

Method 3: npm (advanced). Run npm install -g @anthropic-ai/claude-code. Anthropic says it needs Node.js 22 or later and installs the same native binary as the standalone installer. It also warns: do not use sudo npm install -g, because that can cause permission problems and security risks.

Method 4: the desktop app. The desktop quickstart offers a universal macOS build and a Windows x64 installer, plus a separate Windows ARM64 installer. After signing in, click the Code tab at the top. The page says Claude Code requires a Pro, Max, Team or Enterprise subscription. If you also want claude in a terminal, install the CLI separately.

Which install method should you choose?

For most people, the native installer is the right choice because Anthropic recommends it and it updates itself. Pick another method only if you already manage software through that tool, or you want to avoid the terminal. The table summarises Anthropic's documentation.

MethodPlatformAuto-updatesNeedsBest for
Native installer (curl or PowerShell)Mac, Windows, Linux, WSLYesTerminalMost people
Homebrew caskMacNoHomebrewMac users who already use brew
WinGetWindowsNoWinGetWindows users who manage apps with winget
npmMac, Windows, LinuxNot through Claude Code's own background updater on every setup (see docs)Node.js 22+People who already use npm
Desktop appMac, WindowsNot covered in this guideDownload and sign inNo terminal wanted

What does Claude Code cost, and what is free?

The installer and the CLI download cost nothing, but you need a paid plan to use it. As of 15 October 2026, Anthropic's pricing page shows Claude Code as "No" on the Free plan and "Yes" on Pro, Max 5x and Max 20x.

PlanPrice (as of 15 October 2026)Claude Code
Free$0No
Pro$17 per month with annual subscription ($200 billed up front), or $20 billed monthlyYes
MaxFrom $100 per month (5x or 20x more usage than Pro)Yes
ConsolePre-paid API creditsYes (per the quickstart)

Anthropic says prices exclude tax, usage limits apply, and plans are subject to change at its discretion. Team and Enterprise prices are not covered here. Check the pricing page before you buy.

What can go wrong, and how do you fix it?

Most failures come from the wrong shell, a missing PATH entry, or an old operating system. Run claude doctor for a read-only report. The fixes below come from Anthropic's troubleshooting guide and terminal guide.

1. command not found: claude (Mac) or 'claude' is not recognized (Windows). The install folder is not on your PATH. The installer puts the program at ~/.local/bin/claude on macOS, or %USERPROFILE%\.local\bin\claude.exe on Windows, and it does not change PATH itself. On a Mac using Zsh, run:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

On Windows, run this in PowerShell, close the window, and open a new one:

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

2. 'irm' is not recognized or && errors. You used the command for the wrong shell. Use the PowerShell command in PowerShell and the CMD command in CMD. Running the Mac curl ... | bash line in PowerShell also fails.

3. SSL/TLS error on an older Windows 10 PC. Run this line first, then retry:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
irm https://claude.ai/install.ps1 | iex

4. "Claude Code does not support 32-bit Windows". On a 64-bit PC, you probably opened Windows PowerShell (x86). Close it and open the entry without (x86).

5. dyld error or "built for Mac OS X 13.0". Your macOS is older than 13.0. Check Apple menu > About This Mac, then update through Software Update.

6. The installer prints HTML or syntax error near unexpected token '<'. The URL returned a web page instead of the script. If the page says "App unavailable in region," Claude Code is not available in your country. Otherwise retry, or use brew install --cask claude-code.

7. "This organization has been disabled" despite a subscription. Anthropic says a stale ANTHROPIC_API_KEY environment variable, often from an old job or project, can override your subscription login. Remove it from your shell profile.

8. Running claude opens the Desktop app on Windows. An older Claude Desktop can take PATH priority over the CLI. Anthropic's fix is to update Claude Desktop.

Is it safe and allowed to install Claude Code this way?

The install command downloads a script from claude.ai and runs it. It is allowed, but Claude Code is only available in Anthropic's supported countries. If you want to check what you installed, Anthropic gives options on its setup page.

  • Each release publishes a manifest.json with SHA256 checksums, signed with an Anthropic GPG key. Signatures exist for releases from 2.1.89 onward.
  • On macOS, the binary is signed by "Anthropic PBC" and notarized by Apple. Verify with codesign --verify --verbose ./claude.
  • On Windows, the binary is signed by "Anthropic, PBC". Verify with Get-AuthenticodeSignature .\claude.exe.

Once it is running, Claude may ask for your permission before creating or changing files, according to the terminal guide. Read each prompt before you approve it.

To remove it later on a Mac, run rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. Deleting ~/.claude as well removes your settings and session history, so skip that step if you want to keep them.

Once it works, you may want Claude in other tools too. See how to use Claude in Slack, how to connect Claude to Gmail and Google Calendar, and how to use Claude in Google Docs, Sheets and Slides.

What's still unclear?

A few points are nuanced or may change.

  • Git for Windows is both optional and recommended. Anthropic's setup page calls it optional, and also says it is recommended on native Windows so Claude Code can use the Bash tool. Either way, Claude Code falls back to PowerShell without it.
  • Pricing and plan limits can change. The figures above are Anthropic's as of 15 October 2026, and the company says plans can change at its discretion. Usage limits also apply, and this article does not state their size.
  • Team and Enterprise setup. Admin settings, roles and cloud-provider logins are outside this guide.
  • The weakest point of the terminal route. The install command shows no progress, which can look like a freeze. Anthropic's own guidance is to leave the window open and wait. If it truly hangs, the troubleshooting guide covers fixes.

Last checked: 15 October 2026.

Frequently asked questions

Is Claude Code free to install?

The installer costs nothing, but Claude Code will not run on the free claude.ai plan. Anthropic's setup page says it needs a Pro, Max, Team, Enterprise or Console account. As of 15 October 2026, Anthropic's pricing page lists Pro at $20 per month billed monthly, or $17 per month on an annual plan, and Max from $100 per month.

Do I need Git to install Claude Code on Windows?

No. Anthropic's setup page calls Git for Windows optional. Without it, Claude Code runs shell commands through PowerShell. With it, Claude Code uses Git Bash for its Bash tool. You also do not need to run the installer as Administrator. WSL setups do not need Git for Windows either.

Which macOS and Windows versions does Claude Code support?

According to Anthropic's documentation, Claude Code needs macOS 13.0 or later, or Windows 10 version 1809 or later (Windows Server 2019 or later also works). The hardware requirement is 4 GB or more of RAM and an x64 or ARM64 processor. An internet connection is required, and the 32-bit version of Windows is not supported.

How do I check that Claude Code installed correctly?

Open a new terminal window and run claude --version. A working install prints a version number followed by (Claude Code). For a deeper check, run claude doctor, which Anthropic describes as a read-only diagnostic of your installation and settings. If the shell says claude is not found, the install folder is probably missing from your PATH.

Do I need to update Claude Code myself?

It depends on how you installed it. Anthropic says native installations update automatically in the background. Homebrew, WinGet, apt, dnf and apk installs do not. For Homebrew run brew upgrade claude-code, and for WinGet run winget upgrade Anthropic.ClaudeCode. You can also run claude update to apply a native update immediately.

Sources

  1. Advanced setup - Claude Code Docs, Anthropic (2026-10-15)
  2. Terminal guide for new users - Claude Code Docs, Anthropic (2026-10-15)
  3. Troubleshoot installation and login - Claude Code Docs, Anthropic (2026-10-15)
  4. Authentication - Claude Code Docs, Anthropic (2026-10-15)
  5. Quickstart - Claude Code Docs, Anthropic (2026-10-15)
  6. Get started with the desktop app - Claude Code Docs, Anthropic (2026-10-15)
  7. Pricing, Anthropic (2026-10-15)