AI Coding Tools

How to Install Claude Code on Windows & macOS (2026): A Step-by-Step Guide

Aug 14, 202611 min read

The fastest way to install Claude Code is the native installer (no Node.js required), or run npm install -g @anthropic-ai/claude-code if you already live in the Node ecosystem. Windows also has WinGet and WSL2; macOS has Homebrew. You need a paid Claude account (Pro, Max, Team/Enterprise, or Console API) - the free claude.ai plan will not unlock it. Once installed, confirm with claude --version, then open your first session by running claude inside a project folder.

double-check every command and version number against the official docs at code.claude.com/docs before you follow along, since Anthropic ships changes quickly.

I'm Jasmine, a dev who uses Claude Code every day on both Windows and macOS. This guide covers both operating systems on one page, with copy-paste commands for every step, plus how to pick the right method, how to verify your install, and how to fix the errors people hit most. If you are not sure what this tool actually is yet, read what Claude Code is first, then come back here.

What you need before installing (system requirements)

Before typing any commands, run through this quick checklist so you do not finish the install only to find it will not run:

  • Operating system: Windows 10 (build 1809 or newer) or Windows 11; or macOS (both Apple Silicon and Intel work).
  • A paid Claude account - required: Claude Code needs a Pro ($20/month), Max 5x ($100/month), Max 20x ($200/month), Team/Enterprise plan, or token-based billing through the Anthropic Console (API). The free plan on claude.ai will not unlock Claude Code.
  • Terminal: PowerShell or Windows Terminal (Windows); Terminal or iTerm2 (macOS).
  • Depending on your method: if you install via npm, you need Node.js 22 or newer. The native installer needs no Node at all. On Windows, installing WSL2 or Git for Windows gives you a smoother command-line experience.

Important: this is where a lot of newcomers trip up - you can download and install Claude Code on a free plan, but sign-in gets blocked because the account has no access. Upgrade to a paid plan first, or have an API key from the Console ready to go.

One quick tip before you start: if your machine already has Node, run node --version to see which version you are on - if it is an older release (18 or 20) you will need to upgrade before installing via npm, or just switch to the native installer and skip Node entirely. As for footprint, Claude Code is a lightweight command-line tool that does not demand much disk or RAM; the thing that actually determines speed is your network connection, not your hardware.

How to pick the right install method

There are four common approaches. If you are on the fence, just go with the native installer - it is the leanest option and it self-updates. The table below helps you decide in about 30 seconds:

MethodWhat it needsBest forPros / Cons
Native installer Just a terminal (no Node) Most people, beginners + Lean, auto-updates in the background / - Less manual version control
npm Node.js 22+ Devs already at home in Node + Familiar tooling / - You manage Node and global permissions yourself
WSL2 + npm Windows + WSL2 + Node inside Ubuntu Windows users who want a Linux environment + Best POSIX experience / - More involved setup
Homebrew macOS + Homebrew macOS users already on brew + Stays in sync with your other tools / - macOS only

Install Claude Code on Windows

Windows in 2026 has a native installer and WinGet, so WSL is no longer required the way it used to be. That said, WSL2 still gives you the smoothest Linux-style command line. Pick one of the three approaches below.

Open PowerShell and run Anthropic's one-line install command. This route needs no Node.js and self-updates afterward:

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

This command downloads the stable build for your OS and architecture, installs the binary into your user directory, and adds it to your PATH automatically. Once it finishes, close and reopen your terminal so the PATH refreshes, then check with claude --version. If PowerShell blocks the script because of the Execution Policy, you can loosen it for the current session with Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass and run it again.

Method 2 - WinGet

If you already manage software with WinGet, you can install it directly:

winget install Anthropic.ClaudeCode

WinGet suits anyone who wants to keep Claude Code updated alongside everything else via winget upgrade.

Method 3 - WSL2 + npm (Linux environment)

This is the pick for anyone who wants a real Linux environment on Windows. Open PowerShell as administrator and enable WSL2:

wsl --install

Restart if prompted, open Ubuntu, then install Node.js 22 LTS inside WSL (use nvm or the official NodeSource repository). After that, install Claude Code via npm:

npm install -g @anthropic-ai/claude-code

A few things to keep in mind with WSL2:

  • Do NOT run sudo npm install -g - installing globally with sudo tends to cause permission headaches later. Configure an npm prefix in your user directory, or use nvm.
  • Keep your code inside the WSL filesystem (for example ~/projects) rather than a mounted /mnt/c/... path - I/O is dramatically faster.
  • Install Git for Windows (or git inside WSL) - Claude Code works best with git available. If you run plain PowerShell with no git, some operations are limited.

Install Claude Code on macOS

On macOS you have two clean routes: native installer/Homebrew (no Node) or npm if you already have Node. Both work fine on Apple Silicon (M1/M2/M3 and up) and Intel Macs; the installer detects the right architecture, so you never pick manually. If you have never used Terminal on a Mac, open it via Spotlight (Cmd+Space, type "Terminal") and you are set.

Method 1 - Native installer / Homebrew

The fastest route, with no Node.js, runs in Terminal:

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

If you already use Homebrew and want to manage it alongside your other tools:

brew install --cask claude-code

Method 2 - npm

If you are comfortable with Node, install Node.js 22+ first (grab the LTS from nodejs.org or run brew install node), then install Claude Code:

brew install node
npm install -g @anthropic-ai/claude-code

Confirm Node is new enough with node --version (it must be 22 or higher). If you hit a permission error during a global install, avoid sudo - reset your npm prefix to your user directory instead.

Authentication and your first session

Installing is not enough - you have to sign in to unlock it. Move into any project folder and run:

cd path-to-your-project
claude

On the first run, Claude Code opens your browser to sign in to your Anthropic account (or paste an API key if you use the Console). Once you are signed in, return to the terminal and your session begins. If you log in with a Pro/Max account, your usage limits track your subscription; if you use an API key, you are billed per token - the two are separate, so pick whichever fits your needs and budget.

Right away, try a simple prompt like "list the structure of this directory" to confirm Claude Code can read your project. This is also a good moment to get comfortable: you can type requests in English (or any language), and you always preview changes before approving a file write.

Claude Code also asks whether you trust the current folder. That is a safety mechanism: the tool only reads and writes files in folders you allow. For an unfamiliar project you just cloned, think before granting access.

Verify the install worked

Most guides skip this step, but verifying helps you catch PATH or version problems early. Run these commands and compare against the expected result:

CommandPurposeExpected result
claude --versionPrint the installed versionShows a version string (no error)
claude doctorDiagnose your install environmentA checklist with the key items reading "OK"
where.exe claude (Windows)Show the executable pathReturns a valid path
which claude (macOS)Show the executable pathReturns a valid path

If claude --version runs and claude doctor shows no red errors, consider your install a success.

Common install errors and quick fixes

Here are the errors I hit most often installing on both operating systems, with a fast fix for each:

  • 'claude' is not recognized / command not found: the executable is not on your PATH. Close and reopen your terminal; if it still fails, add the install directory (usually ~/.local/bin) to your PATH and restart the terminal.
  • Node too old: npm errors out when Node is below the required version. Upgrade Node to 22+ with nvm or by reinstalling the LTS from nodejs.org.
  • Permission error (EACCES) during npm install -g: do not patch it with sudo. Reconfigure your npm prefix to a user directory, or switch to the native installer to dodge global-permission issues entirely.
  • WSL not enabled (Windows): if wsl --install errors, enable both "Virtual Machine Platform" and "Windows Subsystem for Linux" in Windows Features, then restart.
  • Terminal not refreshed: after installing, new environment variables only apply to new terminal sessions. Always open a fresh terminal before trying again.

Running into something else, or want to dig deeper? See the dedicated guide on fixing common Claude Code errors - where I collect the full fix for each situation.

Updating and uninstalling

Updating:

  • Native installer: updates itself in the background, nothing to do. To check manually you can run claude update.
  • npm: run npm update -g @anthropic-ai/claude-code.

Uninstalling:

  • npm: npm uninstall -g @anthropic-ai/claude-code.
  • Homebrew: brew uninstall --cask claude-code.
  • Native installer: delete the binary in ~/.local/bin and the related config directory.

What to do next after installing

Now that Claude Code runs, it is time to actually use it. A suggested path:

Once it feels natural, you can move faster with prebuilt skill and subagent bundles - for example the AgentKit bundle for Claude Code (which activates through the ak CLI (20% off via link)) saves you from configuring each skill by hand. It is optional - Claude Code works perfectly well before you ever reach for a kit.

Frequently asked questions (FAQ)

Does installing Claude Code cost money?

Installing it is free, but to use it you need a paid Claude account: Pro ($20/month), Max 5x ($100/month), Max 20x ($200/month), a Team/Enterprise plan, or token-based billing through the Anthropic Console. The free claude.ai plan does not unlock Claude Code.

Do I need to know how to code?

Basic programming knowledge helps you work effectively, but you do not have to be an expert. You need to know how to open a terminal, move between folders, and read output. Complete beginners can still use it as long as they follow the steps carefully.

Is WSL required on Windows?

No. Windows in 2026 has a native installer and WinGet, so you can install directly without WSL. That said, WSL2 still gives the smoothest Linux-style experience, which suits you if your projects expect a POSIX environment.

Which Node.js version do I need?

You only need Node if you install via npm, and you should use Node.js 22 or newer. If you use the native installer, you do not need Node.js at all.

Can I run it on a low-spec machine?

Yes. Claude Code runs most of its processing on Anthropic's servers, so it does not demand a powerful machine; the real requirements are a stable network connection and a paid account. A modest setup works fine.

How do I uninstall Claude Code?

It depends on how you installed it: npm uses npm uninstall -g @anthropic-ai/claude-code; Homebrew uses the matching brew uninstall; the native installer means deleting the binary in ~/.local/bin along with its config directory.

Conclusion

Installing Claude Code on Windows or macOS comes down to three things: pick a method (the native installer is safest for beginners), sign in with a paid account, then verify with claude --version and claude doctor. If you get stuck, revisit the common-errors section above or the dedicated guide on fixing Claude Code errors. Once it is installed, start with the 10 steps for beginners to make your first session genuinely productive.

Source for install commands and system requirements: Anthropic's official docs at code.claude.com/docs (accessed 08/2026).

J

Jasmine

Author · Jasmine Daily

The writer behind Jasmine Daily - jotting down thoughts, experiences, and everyday moments. Honest, unhurried, imperfect.

Jasmine Daily

There's more waiting to be read.

If this piece spoke to you, browse a few more pages from the journal.

Read next

Related posts