claude code
How to Install Claude Code (Mac, Windows and Linux)
Install Claude Code in about two minutes with one command. No Node.js, no npm, and a fix for the "command not found" error that trips up almost everybody.
I watched somebody spend forty minutes installing Claude Code last week.
Forty minutes. On a two minute job.
Not because they were slow, but because the guide they were following told them to install Node.js first, then npm, then fight with permissions, then sudo their way into a mess that took longer to unpick than the original install would have taken.
That guide was not wrong when it was written. It is just old. And the internet does not update old guides, it just leaves them lying around like a rake in the grass.
So here is the actual current way to do it. On every platform. Plus the one error that gets almost everybody.
Before You Install Claude Code
You need a paid plan. This is the bit people find out too late, and it is genuinely irritating. Claude Code does not work on the free Claude plan. You need Pro, Max, Team or Enterprise, or a Console account billed by the token.
The install itself works fine without one. You just get to the login screen and hit a wall.
Your machine is almost certainly fine. macOS 13 or newer, Windows 10 build 1809 or newer, or Ubuntu 20.04, Debian 10 or Alpine 3.19 and up. 4 GB of RAM, x64 or ARM64. If your computer is from this decade you are good.
How to Install Claude Code on Mac, Linux or WSL
One line. That's the whole thing.
curl -fsSL https://claude.ai/install.sh | bash
That is the native installer. It pulls down a self-contained binary, so there is no Node.js, no npm, nothing to set up first. And it quietly updates itself from then on, which is exactly what you want from a tool you are going to use every day.
Now open a terminal inside a project and start it.
cd ~/projects/my-app
claude
It sends you to your browser to log in. Do that, and you are in.
Two minutes. Told you.
How to Install Claude Code on Windows
Two real options, and the right one depends on where your code already lives.
Native Windows. Run this in PowerShell. No Administrator needed.
irm https://claude.ai/install.ps1 | iex
In CMD instead? Different command.
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Not sure which one you are staring at? Look at the prompt. PowerShell shows PS C:\. CMD just shows C:\ with no PS. If you run the wrong one it will yell at you, which is at least honest of it.
Grab Git for Windows while you are at it. It is technically optional, but it gives Claude Code a real Bash shell to run commands in. Without it, Claude falls back to PowerShell, which works but behaves differently from every tutorial you are about to read. Save yourself the confusion.
WSL 2. If your projects already live in WSL, or you want sandboxed command execution, install inside WSL and use the Mac and Linux command from above. Run it from the WSL terminal, not from PowerShell.
Other Ways to Install Claude Code (And Why You Probably Should Not)
The native installer is the one. These exist if you have a reason.
Homebrew, on Mac. Does not auto-update, so brew upgrade claude-code is now your problem.
brew install --cask claude-code
WinGet, on Windows. Also does not auto-update.
winget install Anthropic.ClaudeCode
npm, if you insist. This is the method every stale blog post recommends and it is the one causing all the trouble. It now needs Node.js 22 or newer, and it installs the exact same binary the native installer does. So you are adding a dependency, a version requirement, and a permissions minefield... to get the identical result.
npm install -g @anthropic-ai/claude-code
And whatever you do, do not run that with sudo. That is the rake in the grass. It causes permission problems that are a genuine pain to unpick later.
There are signed apt, dnf and apk repos too, if you manage your software through your distro like a grown-up.
Check That Claude Code Installed Correctly
claude --version
Want a fuller picture? There is a built-in diagnostic, and it is good. Run it.
claude doctor
Here is what a healthy install actually looks like, straight off my machine.

The line worth caring about is Config install method: native. That means you used the installer I told you to use and it will keep itself updated. If that says npm instead, you went the hard way. It still works, it is just now your job to update it.
Fixing Claude Code "command not found"
This is the big one. The one that makes people think the install failed.

It did not fail. The binary is right there. Your shell just cannot find it, because the folder it went into is not on your PATH.
Do this first. Close your terminal completely and open a new one.
That's it. That is genuinely the fix, most of the time. The installer edits your shell profile, and any terminal window that was already open never reads the updated version. People skip this step because it feels too stupid to be the answer.
It is the answer.
If it still fails, then the folder really is missing from your PATH. On Mac and Linux the binary lives at ~/.local/bin/claude, so add that folder to your PATH in ~/.zshrc or ~/.bashrc, then open a fresh terminal.
One Last Thing Before I Let You Go
You have it installed. Congratulations, you are now dangerous.
And the temptation right now is to open it in your biggest, gnarliest project and ask it to fix everything. Which is precisely how people end up concluding the tool does not work.
Do something small first. Open it in a real project and ask it to explain the codebase to you. It will go read your files to answer, and that single boring question does more for the rest of your session than any prompt trick you will ever find on Twitter.
Start there.
Frequently asked questions
- Do I need Node.js to install Claude Code?
- No. The native installer ships a self-contained binary and does not touch Node at all. Node only matters if you deliberately pick the npm route, and that now needs Node 22 or newer. If you have no strong reason to use npm, use the native installer and skip the whole thing.
- Is Claude Code free to install?
- The install is free. Using it is not. Claude Code requires a Pro, Max, Team or Enterprise plan, or a Console account billed per token. Install it on the free plan and you get as far as the login screen and stop, which is an annoying way to find out.
- Why do I get "command not found" after installing Claude Code?
- The binary installed fine. Your shell just cannot see it, because the folder it landed in is not on your PATH. Close your terminal and open a brand new one first, because the installer edits your shell profile and windows that were already open never read the update. That fixes it most of the time.
- Can I run Claude Code on Windows without WSL?
- Yes. It runs natively on Windows 10 build 1809 or newer, straight from PowerShell or CMD, and you do not need Administrator rights. Git for Windows is optional but worth installing, because it gives Claude a real Bash shell. Use WSL 2 instead if your projects already live there or you want sandboxed command execution.
- How do I update Claude Code?
- If you used the native installer, it updates itself in the background and you do nothing. To force it right now, run `claude update`. Homebrew, WinGet and Linux package manager installs do not auto-update, so those need `brew upgrade claude-code`, `winget upgrade Anthropic.ClaudeCode`, or your usual system upgrade.
Learn it by doing it
Reading about Claude Code only gets you so far
Meet Claude drops you into a working terminal and makes you run the commands yourself. No setup, no video, nothing to install to get started.
- 62 lessons across Claude Code, Git, GitHub, Railway and Vercel
- A real terminal in the browser, so you practise instead of watching
- Progress, streaks, and a certificate when you finish
Keep reading
Claude Code Pricing (What It Costs and What You Actually Get)
Claude Code pricing without the marketing. What every plan costs, why the free plan will not work, how the usage limits really behave, and why you should not buy Max first.
ReadHow to Use Claude Code (A Beginner's Guide You Can Practice On)
How to use Claude Code without wasting your first week. The habit that separates people who ship with it from people who rage-quit, and a hands-on activity you can try right here.
ReadClaude Code vs Cursor (An Honest Comparison)
Claude Code vs Cursor, compared honestly. What each one actually is, where each genuinely wins, what they cost, and why the versus framing is mostly wrong.
Read