Part ofWhat Is Claude Code? The Complete Guide
In This Article
6 sectionsQuick answer
Learn how to install and run Claude Code on Windows with the native PowerShell installer or npm, set up your terminal, log in, and fix common gotchas.
Key takeaways
- The fastest install is the native PowerShell one-liner irm https://claude.ai/install.ps1 | iex — no Node.js, no admin rights, and no WSL required.
- Claude Code runs natively on 64-bit Windows 10 (1809+) or Windows 11 with 4 GB of RAM, and needs a paid Claude plan or Console API credits — the free tier does not include it.
- WinGet (winget install Anthropic.ClaudeCode) and npm (Node.js 22+) are alternative install routes, but WinGet builds do not auto-update.
- WSL 2 is only needed for sandboxed command execution or Linux-first toolchains; if you use it, run the Linux installer inside the WSL terminal, not from PowerShell.
- If Windows says claude is not recognized, the terminal loaded before PATH updated — close every terminal window and open a fresh one.
To install Claude Code on Windows, open PowerShell and run irm https://claude.ai/install.ps1 | iex. The native installer needs no Node.js, no admin rights, and no WSL. You then run claude, log in through your browser with a Claude Pro or Max account, and start coding in any project folder.
Installation paths and platform requirements verified 31 July 2026 against the Claude Code setup guide
For a long time, running the terminal coding agent on a PC meant wrestling with Windows Subsystem for Linux. That is no longer true. Getting Claude Code on Windows now takes about two minutes, works natively in PowerShell or Command Prompt, and behaves like any other Windows CLI tool. If you are still deciding whether the agent is right for you, our overview of what Claude Code is explains the bigger picture before you install. We set this up on our own machine first, which is why the prompts and outputs here match what you will see.
This guide walks through the requirements, every install method, the first-run login, and the handful of Windows-specific gotchas that trip people up.
Key takeaway
To install Claude Code on Windows, run irm https://claude.ai/install.ps1 | iex in PowerShell — the native installer needs no Node.js, no admin rights, and no WSL, and runs natively on Windows 10 (1809+) or 11 with 4 GB of RAM; reach for WSL 2 only when you need sandboxed command execution.
What you need to run Claude Code on Windows
A supported Windows build, a paid Claude plan or API credits, and either the native installer or Node.js. Git is not required but makes review far easier.
Before you install, check that your machine meets the baseline. The requirements are light — this is a command-line tool, not a heavy IDE.
| Requirement | What you need |
|---|---|
| Operating system | Windows 10 (1809 or newer) or Windows 11, 64-bit; Windows Server 2019+ |
| Memory | 4 GB RAM or more |
| Processor | x64 or ARM64 |
| Terminal | PowerShell, Windows Terminal, or Command Prompt (CMD) |
| Account | Claude Pro, Max, Team, Enterprise, or a Console account with API credits |
| Optional | Git for Windows, Node.js 22+ (for the npm method), WSL 2 (for sandboxing) |
The most important line is the account. Claude Code is not part of the free Claude.ai tier — you need at least a Pro subscription or an Anthropic Console account with credits. Everything else is either already on your PC or one quick download away.
A terminal is the only interface you strictly need. If you have never opened one, Windows Terminal (bundled with Windows 11 and free from the Microsoft Store on Windows 10) is the friendliest choice because it hosts PowerShell in a modern, tabbed window. Note that Claude Code is the terminal agent, not the chat app — if you were expecting a window instead of a command line, our explainer on whether Claude for Windows is the same as Claude Desktop clears up the naming.
Install with the native installer
The native installer is the shortest path — it handles the binary and PATH for you, with no Node.js toolchain to maintain separately.
The native installer is Anthropic's recommended method and the fastest path to a working setup. It does three things for you:
- Downloads a self-contained binary — no Node.js or package manager required
- Adds Claude Code to your PATH automatically
- Keeps itself updated in the background, so you rarely think about versions
Open PowerShell (search the Start menu for it) and run:
irm https://claude.ai/install.ps1 | iex
If you prefer Command Prompt (CMD) instead, the equivalent one-liner is:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
You do not need to run the terminal as Administrator. When the installer finishes, close and reopen the terminal so the new PATH entry loads, then move into any project folder and launch the agent:
claude

Native installations update themselves automatically, so you rarely have to think about versions. If you ever want to force the newest build, our guide on how to update Claude Code covers claude update and the release-channel settings.
Install with WinGet or npm instead
WinGet suits machines already managed through it; npm suits developers who want the package pinned alongside their other tooling. Both end at the same claude command.
The native installer is not your only option. Two alternatives cover common preferences.
WinGet. If you manage software through Windows Package Manager, install with a single command:
winget install Anthropic.ClaudeCode
WinGet installs do not auto-update, so run winget upgrade Anthropic.ClaudeCode periodically.
npm. Node.js users can install the same binary through the global npm registry:
npm install -g @anthropic-ai/claude-code
As of recent releases, the npm package expects Node.js 22 or later. On an older Node version it prints an EBADENGINE warning rather than failing — the install still completes and claude still runs, because the package pulls down a native binary that does not use your Node runtime at all. Even so, if you are choosing the npm route it is worth getting the version right; our primer on Node.js for Claude Code explains how to install and manage it cleanly on Windows.
One rule holds across every method: never use sudo or an elevated npm install. On Windows that mostly means don't force a global install into a protected directory — it is the single most common cause of permission errors.
Native Windows or WSL: which should you pick?
Use native for Windows projects and WSL when your toolchain is Linux-first. Mixing them causes path and line-ending friction that is tedious to debug.
You can run Claude Code on Windows two ways: natively, or inside Windows Subsystem for Linux. Native is the right default for most people now. WSL still matters if you work in a Linux toolchain or want sandboxed command execution.
| Setup | Requires | Sandboxing | Best for |
|---|---|---|---|
| Native Windows | Nothing (Git for Windows optional) | Not supported | Windows-native projects and tools |
| WSL 2 | WSL 2 enabled | Supported | Linux toolchains, sandboxed commands |
| WSL 1 | WSL 1 enabled | Not supported | When WSL 2 is unavailable |
Sandboxing is the main reason to reach for WSL: it lets the agent run commands in an isolated environment, much like the Claude Code sandbox on Mac does on macOS. If you go the WSL route, open your Linux distribution first and run the macOS/Linux installer (curl -fsSL https://claude.ai/install.sh | bash) inside the WSL terminal — not from PowerShell. You then launch claude from WSL as well. Mixing the two environments mid-setup is a frequent source of confusion.
Git for Windows is worth a mention here. It is optional, but installing it lets Claude Code use Git Bash to power its Bash tool. Without it, the agent falls back to a native PowerShell tool, which now works well for most tasks. So Git for Windows is a nice-to-have, not a blocker.
We build and publish this whole site running Claude Code on Windows natively, not through WSL, and after living in that setup daily the split we would recommend is clear: native is the right home unless a specific job genuinely needs a Linux toolchain. Having Git Bash installed turned out to matter more than we expected, because the agent leans on POSIX-style commands constantly and Git Bash lets those run without translation. The one native quirk that still catches us is that PowerShell and Git Bash want different command syntax, so we settled on picking one shell per task rather than hopping between them mid-session.
First-run login and verifying your install
Run claude and complete the browser sign-in, then confirm with a trivial prompt. If the command is not found, the PATH entry did not apply — reopen the terminal.
The first time you run claude, the agent has no session yet, so it starts the login flow. It opens your default browser and asks you to authenticate with your Claude account (Pro, Max, Team, or Enterprise) or with an Anthropic Console account that has API credits. Approve the request, return to the terminal, and your session is saved locally — you will not have to log in every time.
Two quick commands confirm everything is healthy:
claude --version
claude doctor
claude doctor is the more thorough check: it reports your install type, PATH status, shell configuration, and the result of the last auto-update. Run it any time something feels off. If the browser handoff fails or you want the full picture of account types and token storage, see our walkthrough on how to authenticate Claude Code in the terminal.
Once you are logged in, you are ready to work. Point the agent at a repository, describe what you want, and let it read files, run commands, and make edits. The full command reference lives in our Claude Code CLI documentation if you want to go deeper on flags and slash commands.

Common gotchas (and fixes)
Most issues are PATH after install, CRLF line endings confusing diffs, or antivirus quarantining the binary. All three are configuration, not defects.
Most Windows setup problems come from a small, predictable set of causes. Here is how to clear them fast.
"claude is not recognized." This almost always means the current terminal loaded before PATH was updated. Close every terminal window and open a fresh one. If it still fails, add the install directory to your user PATH manually:
[Environment]::SetEnvironmentVariable("PATH", "$env:PATH;$env:USERPROFILE\.local\bin", "User")
PowerShell vs. CMD confusion. The two shells run different install commands. If you see The token '&&' is not a valid statement separator, you pasted the CMD command into PowerShell. If you see 'irm' is not recognized, you pasted the PowerShell command into CMD. Check your prompt: it reads PS C:\... in PowerShell and C:\... without the PS in CMD.
Don't mix shells mid-setup. If you installed and configured in PowerShell, log in from PowerShell too. Jumping between PowerShell, CMD, Git Bash, and WSL during the first run can scatter your PATH and credentials across environments that do not share state.
Git Bash not found. If you installed Git for Windows but Claude Code cannot locate Git Bash, point it at the executable in your settings.json:
{
"env": {
"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
}
}
Login won't validate. If authentication keeps failing, confirm your Windows clock and time zone are correct — a badly skewed system time breaks token validation. Then retry the login from a clean terminal.
Work through those five and running Claude Code on Windows becomes as routine as any other CLI. From here, the workflow is identical to macOS or Linux — the platform difference disappears once the agent is installed and authenticated.
The one place Windows still bites is MCP servers: Claude Code MCP on Windows covers the cmd /c wrapper that fixes the spawn npx ENOENT error, plus the JSON double-backslash trap.
Frequently Asked Questions

Written by
Edith
Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.
View all posts →


