Skip to content

How to Install Claude Code on Mac and Windows (2026)

Install Claude Code on Mac or Windows with the official installer, sign in, run a safe first task, and fix the real errors people hit, step by step.

By Yotam DahanUpdated 10 min readClaude Code

On this page
  1. Before you start
  2. Option 1: the desktop app, no terminal needed
  3. Option 2: install Claude Code on a Mac
  4. Option 3: install Claude Code on Windows
  5. Sign in for the first time
  6. Run a safe first task
  7. Keep Claude Code up to date
  8. Troubleshooting: the errors people actually hit
  9. What to do next

To install Claude Code, open Terminal on a Mac or PowerShell on Windows, paste Anthropic's one-line installer, then type claude and sign in with a paid Claude account in your browser. It takes a few minutes and you don't need to know how to code. If you would rather never touch a terminal, install the Claude desktop app instead: Claude Code is built into its Code tab.

This walkthrough follows Anthropic's official setup docs as of October 2026. If you are still deciding whether you need Claude Code at all, start with what Claude Code is.

The whole install in four moves
  1. Open a terminal

    Terminal on a Mac, PowerShell on Windows

  2. Paste the installer

    One official line from claude.ai

  3. Check the version

    claude --version prints a number

  4. Sign in

    Run claude in a project folder and log in

Before you start

Run through this checklist first. Most failed installs come from one of these five points:

0 of 5 done

Then pick your method:

MethodBest forHow it updates
Native installer (recommended)Most people, on Mac or WindowsUpdates itself in the background
Claude desktop appPeople who never want to open a terminalThe app keeps its own copy current
Homebrew (Mac)People who already use HomebrewManually, with brew upgrade claude-code
WinGet (Windows)People who manage apps with WinGetManually, with winget upgrade Anthropic.ClaudeCode

Option 1: the desktop app, no terminal needed

  1. Download the app. Get it from Anthropic's desktop quickstart page. The Mac version runs on Intel and Apple silicon, Windows has x64 and ARM64 versions, and a beta for Ubuntu and Debian installs with apt.
  2. Install and sign in. Open Claude and log in with the account that has your paid plan.
  3. Open the Code tab. If it asks you to upgrade, the account you used is on the free plan.
  4. Pick a folder. Choose Local, click Select folder and select an empty folder you made for testing.
  5. Ask for something. Type a request in the box and press Enter.

The app keeps its own copy of Claude Code up to date through Claude > Check for Updates on a Mac or Help > Check for Updates on Windows. If you read Hebrew, ai school also offers a free one-click installer for Mac and Windows that sets up the desktop app for you.

Option 2: install Claude Code on a Mac

Step 1: open Terminal

Press Cmd + Space, type Terminal and press Enter. A window with a blinking cursor appears, and that is where you type commands.

Step 2: run the official installer

Copy this line, paste it with Cmd + V and press Enter:

Terminal
curl -fsSL https://claude.ai/install.sh | bash

It downloads and runs Anthropic's installer from claude.ai. Nothing seems to happen for a while because it shows no progress, so leave the window alone until you see Claude Code successfully installed!

Step 3: check that it worked

Close the window, open a new Terminal window so it picks up the new program, and run:

Terminal
claude --version

A version number followed by (Claude Code) means you are ready. If you see command not found: claude instead, jump to the troubleshooting table below.

Option 3: install Claude Code on Windows

Step 1 (optional): install Git for Windows

Git for Windows gives Claude Code a Bash shell to run commands in. Without it, Claude Code uses PowerShell instead, which is fine for most beginners. If you install it, click Next on every screen: the defaults, including the recommended PATH option, are what you need.

Step 2: open PowerShell

Press Win + X and choose Windows PowerShell or Terminal. Check that each line starts with PS C:\; if it starts with C:\ without the PS, you are in Command Prompt, which needs a different command.

Step 3: run the official installer

Paste this with Ctrl + V or a right-click and press Enter:

PowerShell
irm https://claude.ai/install.ps1 | iex

irm downloads the installer and iex runs it. You don't need to run PowerShell as an administrator, and you are done when you see Claude Code successfully installed!

If you are in Command Prompt instead, use this version:

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

Step 4: check that it worked

Open a new PowerShell window and run claude --version. A version number means you are ready.

Sign in for the first time

Make a test folder and start Claude Code inside it. A dedicated folder matters, because Claude Code can read everything in the folder you start it in.

On a Mac:

Terminal
mkdir -p ~/claude-projects/first-test
cd ~/claude-projects/first-test
claude

On Windows, in PowerShell:

PowerShell
mkdir -Force "$HOME\claude-projects\first-test"
cd "$HOME\claude-projects\first-test"
claude

Here is what happens next:

  1. Setup and browser. Claude Code runs a short first-launch setup and opens your browser to sign in.
  2. Sign in. Use the account that has your paid plan. If the browser doesn't open, press c to copy the login link and paste it into the browser yourself.
  3. Confirm. When the terminal shows Login successful, press Enter.
  4. Trust the folder. Claude Code asks whether you trust this folder; you just created it, so accept.
  5. Start working. The Claude Code prompt appears with the version, the model and the folder shown above it. Type /help to see the commands.

Run a safe first task

Start with a question that changes nothing:

First question, changes nothing
What files are in this folder, and what kinds of tasks could you help me with here? Don't create or change anything yet.

Then a tiny change you can see:

First visible change
Create a file called hello.html: a simple page with a heading that says "My first Claude Code page" and one short paragraph explaining what you just did. Then tell me how to open it.

Current versions start terminal sessions in auto mode, where a background safety check reviews each action instead of asking you. While you are learning, press Shift+Tab until the line under the prompt reads manual mode on, so Claude Code asks before every file it creates and every command it runs.

Read each request and choose Yes if it matches what you asked for. When it finishes, double-click hello.html in Finder or File Explorer to open it in your browser.

Keep Claude Code up to date

  • Native installs update themselves in the background, and the new version applies the next time you start Claude Code.
  • claude update installs the newest version right away.
  • claude doctor runs a read-only health check of your install and settings, without starting a session.
  • Homebrew and WinGet installs don't update themselves. Use the upgrade commands from the method table.

Troubleshooting: the errors people actually hit

Match the message you see to a fix. These come from Anthropic's installation troubleshooting page, which also lists rarer cases.

What you seeWhat it meansFix
zsh: command not found: claude (Mac)It installed, but your terminal can't find it yetOpen a new Terminal window. Still failing? Run the Mac PATH lines below
'claude' is not recognized (Windows)Same problem on WindowsOpen a new window. Still failing? Run the Windows PATH lines below
syntax error near unexpected token '<'The install address sent back a web page instead of the installerRetry in a few minutes. If the output says "App unavailable in region", Claude Code isn't offered in your country; otherwise install with Homebrew or WinGet
curl: (22) The requested URL returned error: 403A network filter, proxy or region blockTry another network, or ask your IT team to allow downloads.claude.ai
'irm' is not recognizedYou are in Command Prompt, not PowerShellOpen PowerShell, or use the Command Prompt install line
The token '&&' is not a valid statement separatorYou ran the Command Prompt line in PowerShellUse the PowerShell line from Step 3
A parameter cannot be found that matches parameter name 'fsSL'You pasted the Mac command into PowerShellUse the PowerShell line from Step 3
Claude Code does not support 32-bit WindowsYou opened Windows PowerShell (x86)Close it and open Windows PowerShell without "(x86)"
Claude Code on Windows requires either Git for Windows (for bash) or PowerShellIt found neither shellInstall Git for Windows with "Add to PATH" selected
Could not create SSL/TLS secure channelAn older Windows 10 setup isn't using TLS 1.2Run [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, then the installer, in the same window
dyld: cannot load or Symbol not found (Mac)Your macOS is older than version 13Update macOS, then run the installer again
OAuth error: Invalid codeThe login code expired or was cut offPress Enter to retry and finish the browser step quickly
API Error: 403 Request not allowedThat account has no active paid planCheck your plan at claude.ai/settings, then run /login
Credit balance is too low while you have a subscriptionClaude Code is using an API key, not your planRun /status, remove ANTHROPIC_API_KEY from your environment, restart and run /login

To fix the PATH on a Mac, which uses the Zsh shell by default, run these two lines and then open a new window:

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

To fix the PATH on Windows, run these two lines in PowerShell, then close and reopen PowerShell:

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

If claude --version works but something else misbehaves, run claude doctor and read its warnings, since each one comes with a suggested fix.

Quick check0 of 3 correct

You pasted the install line on Windows and got "'irm' is not recognized". What happened?

The install finished but your Mac says "command not found: claude". What should you try first?

Why start Claude Code in a dedicated project folder?

What to do next

Spend your first hour on small, safe tasks so you learn the controls before you point Claude Code at anything important. The beginner tutorial walks you through a complete first project, and the guide to the CLAUDE.md file shows how to save your preferences so you stop repeating them. Keep the Claude Code cheat sheet open in a tab for commands and shortcuts, and if you want the whole path in one place, the Claude Code course starts with installation and ends with projects you can use in your business.

Copy-paste first-week prompt pack

12 prompts to run in your first week with Claude Code, from safe read-only questions to a small build, each with what to check in the answer.

Enter your email and the full section opens right here. You also get a free lesson from the course.

No spam. One click to unsubscribe. We use your email to send you the course and AI tips.

Frequently asked questions

Do I need administrator rights to install Claude Code?

No. The native installer puts Claude Code in your own user folder (~/.local/bin on a Mac, %USERPROFILE%\.local\bin on Windows), so you don't need to run it as an administrator or use sudo.

How do I uninstall Claude Code?

For a native install on a Mac, run rm -f ~/.local/bin/claude and then rm -rf ~/.local/share/claude in Terminal. On Windows, delete claude.exe from %USERPROFILE%\.local\bin and the %USERPROFILE%\.local\share\claude folder. Homebrew and WinGet installs are removed with brew uninstall --cask claude-code or winget uninstall Anthropic.ClaudeCode.

Can I install Claude Code with npm instead?

Yes. npm install -g @anthropic-ai/claude-code installs the same program if you have Node.js 22 or later. Anthropic marks the native installer as the recommended option and it updates itself, and you should never run the npm command with sudo.

Does Claude Code run on Linux?

Yes. Anthropic supports Ubuntu 20.04 or newer, Debian 10 or newer and Alpine Linux 3.19 or newer, using the same curl command as the Mac or signed apt, dnf and apk packages.

How do I switch Claude Code to a different Claude account?

Type /login inside Claude Code to sign in with another account, or /logout to sign out completely so the next launch asks you to log in again. To keep a work and a personal account side by side, Anthropic's authentication docs show how to give each account its own configuration folder.

Keep reading