Claude Code on Windows: install it, check it, fix the common errors

The official installer takes one line. What usually goes wrong comes after: a PATH that was not updated, the wrong shell, Git Bash that cannot be found. This guide covers the install and every common fix.

THE SHORT VERSION
  • Open PowerShell and run irm https://claude.ai/install.ps1 | iex. No administrator rights needed.
  • Open a new terminal, run claude --version and then claude doctor.
  • You need Windows 10 version 1809 or later, 4 GB of RAM, and a paid Claude plan or a Console account. Git for Windows is optional now.
  • Most errors come from a PATH that has not been picked up yet or from pasting a command into the wrong shell. Both are fixed below.

Claude Code used to be awkward on Windows. You needed Node.js, then Git Bash, and for a while WSL was the only way that worked well. That has changed. Anthropic now ships a native Windows installer, Claude Code can run its commands through PowerShell, and WSL is optional.

This guide follows Anthropic's own setup and troubleshooting pages as they stood on 4 October 2026. Every command was copied from them, character for character.

We make AigoPilot, a Claude Code GUI for Windows, so we set up Claude Code on Windows PCs more often than most people. The errors below are the ones Anthropic's own troubleshooting page covers, with the fixes it gives. AigoPilot can also run this installer for you, but everything here works without it.

Before you start

  • Windows: Windows 10 version 1809 or later, or Windows Server 2019 or later. 32-bit Windows is not supported.
  • Hardware: 4 GB of RAM or more, on an x64 or ARM64 processor.
  • Account: a Claude Pro, Max, Team or Enterprise plan, or a Console account billed by API usage. The free claude.ai plan does not include Claude Code.
  • Shell: PowerShell or CMD both work. So do Bash and Zsh under WSL.

Not sure which version of Windows you have? Press Win + R, type winver and press Enter.

Step 1: install Claude Code

There are five ways to install it. Use the first unless you have a reason not to.

The native installer (recommended)

In PowerShell:

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

In CMD:

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

The native install updates itself in the background, and it puts claude.exe in %USERPROFILE%\.local\bin. If you prefer the slower, more tested release channel, the installer takes stable as an argument:

& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable

WinGet

winget install Anthropic.ClaudeCode

A WinGet install does not update itself. Run winget upgrade Anthropic.ClaudeCode from time to time, or set the environment variable CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1.

npm

Still supported, and useful if you manage tools through Node. It needs Node.js 22 or later.

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

To upgrade, run npm install -g @anthropic-ai/claude-code@latest. Anthropic advises against npm update -g.

WSL

Open your Linux distribution and install the Linux build inside it:

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

Choose WSL 2 if you want Claude Code's sandbox, which isolates the commands the agent runs. The sandbox works under WSL 2. It does not work under WSL 1 or on native Windows.

Step 2: decide about Git for Windows

Git for Windows is optional now. Without it, Claude Code runs shell commands through its PowerShell tool. With it installed, Claude Code uses Git Bash for its Bash tool.

You probably want it anyway. Claude Code is much more useful in a git repository, where it can show you diffs, make commits and work in separate worktrees, and the Claude desktop app needs Git for worktree sessions. Install it from git-scm.com or with winget install Git.Git, then open a new terminal.

Step 3: sign in

Go to a project folder and start Claude Code:

cd C:\code\my-project
claude

A browser window opens and asks you to sign in with your Claude account. If the browser does not open, press c to copy the sign-in link and paste it into a browser yourself. If an ANTHROPIC_API_KEY environment variable is set, Claude Code asks you once whether to use that key instead.

Step 4: check that it works

claude --version
claude doctor

claude --version prints something like 2.1.211 (Claude Code). claude doctor checks the install and your settings without starting a session. Inside a session, /doctor runs the same check and offers fixes, and /status shows which account you are signed in with.

Fixing the common errors

'claude' is not recognized as an internal or external command

The install worked, but your terminal does not know where claude.exe is. First, close the terminal and open a new one; a terminal that was open during the install still has the old PATH. If it still fails, check whether the folder is on your PATH:

$env:PATH -split ';' | Select-String '\.local\\bin'

If nothing comes back, add it to your user PATH and open a new terminal:

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

'irm' is not recognized, or "The token '&&' is not a valid statement separator"

You pasted the command into the wrong shell. irm is PowerShell, so seeing it rejected means you are in CMD. The && error means you are in PowerShell running the CMD line. And "A parameter cannot be found that matches parameter name 'fsSL'" means you ran the Linux command in PowerShell. Check the title of your terminal tab and use the matching command from step 1.

"Claude Code on Windows requires either Git for Windows (for bash) or PowerShell"

Claude Code found neither shell. It looks for Git in C:\Program Files\Git, then C:\Program Files (x86)\Git, then whatever git is on your PATH. If Git is somewhere else, find it with where.exe git and tell Claude Code where its bash.exe is, in %USERPROFILE%\.claude\settings.json:

{
  "env": {
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  }
}

Point it at bash.exe, not at git-bash.exe; the second one is not accepted. If the problem is PowerShell, add C:\Windows\System32\WindowsPowerShell\v1.0\ to your PATH.

"running scripts is disabled on this system"

This one affects npm installs, not the native installer. PowerShell refuses to run npm's .ps1 wrapper. Allow signed and local scripts for your own user:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

If you would rather not change the policy, call claude.cmd instead of claude, or switch to the native installer.

claude.exe disappeared after an update

An update can be interrupted halfway, leaving the old file renamed. Put the newest copy back:

Get-ChildItem "$env:USERPROFILE\.local\bin\claude.exe.old.*" | Sort-Object Name | Select-Object -Last 1 | Rename-Item -NewName claude.exe

"The process cannot access the file"

Usually antivirus holding the download. Clear the download folder and run the installer again:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads"

On a work PC with endpoint protection or AppLocker, your IT team may need to allow claude.exe, cmd.exe and bash.exe.

Typing claude opens the wrong program

An older Claude desktop app can put its own Claude.exe ahead of the CLI on your PATH. Update the desktop app, and run where.exe claude to see every claude Windows can find. The same command shows leftovers if you installed twice, say once with npm and once with the native installer.

32-bit error on a 64-bit PC

You opened "Windows PowerShell (x86)" by mistake. Close it and open the normal Windows PowerShell or Windows Terminal. [Environment]::Is64BitOperatingSystem should print True.

Sign-in problems

  • Stuck or signed in to the wrong account: run /logout, restart Claude Code and sign in again.
  • Pasting the code back fails: run claude auth login.
  • "This organization has been disabled": an old ANTHROPIC_API_KEY is set. Remove it with Remove-Item Env:ANTHROPIC_API_KEY, and from your user environment variables if you set it there.
  • 403 Request not allowed: check that your plan includes Claude Code, or that your Console role allows it.

Behind a company proxy

Set the proxy before running the installer, then test that the download server is reachable:

$env:HTTP_PROXY = 'http://proxy.example.com:8080'
$env:HTTPS_PROXY = 'http://proxy.example.com:8080'
curl.exe -sI https://downloads.claude.ai/claude-code-releases/latest

If you see TLS errors on an older Windows 10, run [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 first.

WSL picks up the Windows version of Node

If you installed with npm inside WSL and see exec: node: not found or a platform error, WSL is running the Windows npm from /mnt/c/. Check with which npm and which node, install Node inside Linux (nvm works well), and if needed run npm config set os linux before installing again with --force. Simpler still: use the Linux native installer from step 1.

Where Claude Code keeps its files on Windows

WhatWhere
The program%USERPROFILE%\.local\bin\claude.exe (native install)
Your settings%USERPROFILE%\.claude\settings.json
Your sign-in%USERPROFILE%\.claude\.credentials.json
Instructions for every project%USERPROFILE%\.claude\CLAUDE.md
Instructions for one projectCLAUDE.md or .claude\CLAUDE.md in the project
Project settings.claude\settings.json, and .claude\settings.local.json for your own overrides

Treat .credentials.json like a password. Do not copy it into a project folder or a backup you share.

Once it runs

The first session is easy to follow. By the third, in a second project, the hard part is no longer installing anything. It is noticing that one session has been waiting for your permission since lunch. Windows Terminal will not tell you on its own; our guide to Claude Code notifications on Windows shows how to fix that. And if you are choosing between agents, see Codex vs Claude Code.

Questions people ask

Does Claude Code work on Windows without WSL?

Yes. Claude Code runs natively on Windows 10 version 1809 or later and on Windows Server 2019 or later. WSL is optional; you need it only if you want Claude Code's sandbox, which does not run on native Windows.

Do I need Git for Windows to use Claude Code?

No, not any more. Without Git for Windows, Claude Code runs shell commands through PowerShell. With it installed, Claude Code uses Git Bash for its Bash tool.

Why does Windows say 'claude' is not recognized?

The folder the installer uses, %USERPROFILE%\.local\bin, is not on your PATH yet, or the terminal was opened before the install. Open a new terminal first. If that does not help, add the folder to your user PATH.

Can I use Claude Code on Windows with the free Claude plan?

No. Claude Code needs a Pro, Max, Team or Enterprise plan, or a Console account billed by API usage. The free claude.ai plan does not include it.

Sources