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
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.
Open a terminal
Terminal on a Mac, PowerShell on Windows
Paste the installer
One official line from claude.ai
Check the version
claude --version prints a number
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:
| Method | Best for | How it updates |
|---|---|---|
| Native installer (recommended) | Most people, on Mac or Windows | Updates itself in the background |
| Claude desktop app | People who never want to open a terminal | The app keeps its own copy current |
| Homebrew (Mac) | People who already use Homebrew | Manually, with brew upgrade claude-code |
| WinGet (Windows) | People who manage apps with WinGet | Manually, with winget upgrade Anthropic.ClaudeCode |
Option 1: the desktop app, no terminal needed
- 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.
- Install and sign in. Open Claude and log in with the account that has your paid plan.
- Open the Code tab. If it asks you to upgrade, the account you used is on the free plan.
- Pick a folder. Choose Local, click Select folder and select an empty folder you made for testing.
- 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:
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:
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:
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:
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:
mkdir -p ~/claude-projects/first-test
cd ~/claude-projects/first-test
claude
On Windows, in PowerShell:
mkdir -Force "$HOME\claude-projects\first-test"
cd "$HOME\claude-projects\first-test"
claude
Here is what happens next:
- Setup and browser. Claude Code runs a short first-launch setup and opens your browser to sign in.
- Sign in. Use the account that has your paid plan. If the browser doesn't open, press
cto copy the login link and paste it into the browser yourself. - Confirm. When the terminal shows
Login successful, press Enter. - Trust the folder. Claude Code asks whether you trust this folder; you just created it, so accept.
- Start working. The Claude Code prompt appears with the version, the model and the folder shown above it. Type
/helpto see the commands.
Run a safe first task
Start with a question that 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:
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 updateinstalls the newest version right away.claude doctorruns 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 see | What it means | Fix |
|---|---|---|
zsh: command not found: claude (Mac) | It installed, but your terminal can't find it yet | Open a new Terminal window. Still failing? Run the Mac PATH lines below |
'claude' is not recognized (Windows) | Same problem on Windows | Open 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 installer | Retry 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: 403 | A network filter, proxy or region block | Try another network, or ask your IT team to allow downloads.claude.ai |
'irm' is not recognized | You are in Command Prompt, not PowerShell | Open PowerShell, or use the Command Prompt install line |
The token '&&' is not a valid statement separator | You ran the Command Prompt line in PowerShell | Use the PowerShell line from Step 3 |
A parameter cannot be found that matches parameter name 'fsSL' | You pasted the Mac command into PowerShell | Use the PowerShell line from Step 3 |
Claude Code does not support 32-bit Windows | You opened Windows PowerShell (x86) | Close it and open Windows PowerShell without "(x86)" |
Claude Code on Windows requires either Git for Windows (for bash) or PowerShell | It found neither shell | Install Git for Windows with "Add to PATH" selected |
Could not create SSL/TLS secure channel | An older Windows 10 setup isn't using TLS 1.2 | Run [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 13 | Update macOS, then run the installer again |
OAuth error: Invalid code | The login code expired or was cut off | Press Enter to retry and finish the browser step quickly |
API Error: 403 Request not allowed | That account has no active paid plan | Check your plan at claude.ai/settings, then run /login |
Credit balance is too low while you have a subscription | Claude Code is using an API key, not your plan | Run /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:
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:
$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?
Not quite.
irm is a PowerShell command. Open PowerShell, or use the Command Prompt install line instead.
The install finished but your Mac says "command not found: claude". What should you try first?
Not quite.
A window that was already open keeps its old PATH. If a new window still can't find it, add ~/.local/bin to your PATH.
Why start Claude Code in a dedicated project folder?
Not quite.
A small project folder keeps the rest of your files out of reach, and trust is saved for it, unlike your home 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.
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
What Is Claude Code? A Plain-English Guide for 2026
What is Claude Code? A plain-English guide to Anthropic's AI agent: what it can touch on your computer, what it costs and 6 business tasks it handles well.
Claude Code · 10 min readHow to Use Claude Code: A First-Weekend Tutorial (2026)
Learn how to use Claude Code by building a one-page site for a local business: the conversation, permissions, plan mode, undo, and 10 tips that save hours.
Claude Code · 10 min readCLAUDE.md File: What It Is, Where It Goes, 3 Templates
What a CLAUDE.md file is, where it goes, what to write and what to leave out, plus three copy-ready templates for business owners, marketers and websites.
Claude Code · 10 min read