Back to Article List

Run Claude Code on Windows: Native, WSL and Windows Server

Run Claude Code on Windows: Native, WSL and Windows Server

For a long time the standard advice for Claude Code on Windows was two words: use WSL. That advice is stale. The CLI now runs natively on Windows 10 (1809 or newer) and Windows 11, plus Windows Server 2019 and up, installs without admin rights and drives PowerShell or CMD as its shell. WSL remains the better home for certain setups, and I'll be specific about which ones, but you no longer need a Linux layer to get real work done. Here's the native path, the WSL path and the Server-specific notes, in that order.

System requirements on Windows

Anthropic's setup documentation lists Windows 10 1809+ or Windows Server 2019+, 4 GB of RAM and an x64 or ARM64 processor. There's no 32-bit build; the installer stops with "Claude Code does not support 32-bit Windows" if you launch it from an x86 PowerShell entry, which mostly bites people who click the wrong Start menu shortcut on old machines. No GPU is involved because inference runs on Anthropic's API, and you'll need a paid Claude plan (Pro, Max, Team or Enterprise) or a Console account to sign in.

Install Claude Code natively on Windows

Three ways in, and they all land the same binary. The PowerShell one-liner is the one I'd use.

PowerShell install

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

No administrator prompt, no reboot. The installer writes everything under your user profile and finishes in seconds on a decent connection.

CMD install

If you live in the classic command prompt instead:

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

Mixing these two commands up is the most common install failure on Windows, and the error messages tell you exactly which mistake you made. Seeing The token '&&' is not a valid statement separator means you pasted the CMD command into PowerShell. Seeing 'irm' is not recognized means you pasted the PowerShell command into CMD. Quick tell: your prompt starts with PS C:\ in PowerShell and plain C:\ in CMD.

WinGet install

winget install Anthropic.ClaudeCode

The catch: WinGet installs don't auto-update, while the script installs above do. You either run winget upgrade Anthropic.ClaudeCode yourself now and then, or set the CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE environment variable to 1 in settings so Claude Code triggers the upgrade for you. Even then, the upgrade can fail while Claude Code is running because Windows locks the executable, in which case it shows you the manual command instead. Unless you standardize on WinGet for everything, the PowerShell installer is less babysitting.

Where Claude Code installs and how to fix PATH

The binary lands at %USERPROFILE%\.local\bin\claude.exe. Open a new terminal and verify:

claude --version

If Windows answers with 'claude' is not recognized, the install directory isn't on your PATH. Check and fix it from PowerShell:

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

The first line shows what's there; the next two append the install directory to your User PATH. Restart the terminal afterward, since open windows keep their old environment. CMD users can add %USERPROFILE%\.local\bin through System Settings under Environment Variables instead. If the command is found but errors persist, the fixes for install-script failures, conflicting copies and login problems are collected in the Claude Code troubleshooting guide and in Anthropic's official troubleshooting page.

Git for Windows and the Bash tool

One Windows-specific decision matters more than people expect. Claude Code prefers running shell commands through bash, and on native Windows it gets bash from Git for Windows. Without it, Claude Code falls back to a PowerShell tool for command execution, which works but changes how a lot of one-liners are written. I install Git for Windows on every machine anyway (you'll want git itself for the commit workflow), so this costs nothing extra. If Claude Code can't locate Git Bash after install, point at it explicitly in settings.json:

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

Run Claude Code in WSL

The WSL route means opening your distribution's terminal and running the Linux installer there, not in PowerShell:

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

From that point on it behaves exactly like a Linux install, PATH quirks included, so the details in the guide to installing Claude Code on Ubuntu apply verbatim inside an Ubuntu WSL distro.

So which one? My rule is to run Claude Code where the project lives. Code that builds with MSBuild, .NET or PowerShell tooling belongs on native Windows. Code that assumes a Linux toolchain (make, nvm-managed Node, anything with shell scripts in package.json) belongs in WSL 2, where those tools are first-class citizens. WSL 2 has one extra argument going for it: sandboxed command execution is supported there and not on native Windows, so if you want Claude running commands inside an OS-level sandbox, WSL 2 is currently the only way to get that on a Windows machine. WSL 1 is a last resort; it's only worth using when WSL 2 is unavailable and it gets no sandboxing either.

Log in and start a session

Open a terminal in a project folder and run claude. The first launch takes you through browser sign-in with your Claude account; /status afterward confirms the account and plan. From there the workflow is identical across platforms, and the walkthrough in how to use Claude Code picks up exactly where this leaves off, first question to first commit.

Claude Code in VS Code on Windows

If you'd rather work inside an editor panel than a terminal, the VS Code extension (anthropic.claude-code) needs VS Code 1.94.0 or newer. Install it from the Extensions view by searching for "Claude Code". Worth knowing: the extension bundles its own private copy of the CLI inside the extension directory and does not add claude to your PATH. Installing only the extension gives you the panel and nothing in the terminal, so keep the standalone install from this guide if you want both. The two share login and settings without any extra wiring.

Claude Code on Windows Server

Server 2019 and newer run the same installer, and over an RDP session with a browser available the login flow is identical to the desktop. The interesting case is a Server box you only reach through SSH or PowerShell remoting with no browser anywhere. The login screen accounts for this: press c to copy the OAuth URL, open it on your workstation, authorize and paste the resulting code back into the server session. That's the same headless dance Linux admins use.

Honest take for the always-on agent use case, though: if the box exists purely to run Claude Code sessions that outlive your laptop, a Linux server is less friction than Windows Server, and the tmux-based setup in running Claude Code on a VPS is the version of that idea I'd copy. Windows Server earns its place when the code you're working on needs Windows to build or test, and then the native install above is all you need.

Your idea deserves better hosting

24/7 support 30-day money-back guarantee Cancel anytime
Ciclo de Pagamento

VPS.S1

$5.99 Save  17 %
$4.99 Mensalmente
  • 2 vCPU AMD EPYC
  • 2 GB RAMMEMÓRIA
  • 30 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos

VPS.S3

$14.99 Save  33 %
$9.99 Mensalmente
  • 4 vCPU AMD EPYC
  • 6 GB RAMMEMÓRIA
  • 70 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos

EPYC VPS.P1

$8.99 Save  22 %
$6.99 Mensalmente
  • 2 vCPU AMD EPYC
  • 4 GB RAMMEMÓRIA
  • 40 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

EPYC VPS.P2

$16.99 Save  24 %
$12.99 Mensalmente
  • 2 vCPU AMD EPYC
  • 8 GB RAMMEMÓRIA
  • 80 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

EPYC VPS.P4

$29.99 Save  23 %
$22.99 Mensalmente
  • 4 vCPU AMD EPYC
  • 16 GB RAMMEMÓRIA
  • 160 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

EPYC VPS.P5

$39.99 Save  25 %
$29.99 Mensalmente
  • 8 vCPU AMD EPYC
  • 16 GB RAMMEMÓRIA
  • 180 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

EPYC VPS.P6

$59.99 Save  25 %
$44.99 Mensalmente
  • 8 vCPU AMD EPYC
  • 32 GB RAMMEMÓRIA
  • 200 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

EPYC VPS.P7

$69.99 Save  29 %
$49.99 Mensalmente
  • 16 vCPU AMD EPYC
  • 32 GB RAMMEMÓRIA
  • 240 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

Genoa VPS.G2

$24.99 Save  20 %
$19.99 Mensalmente
  • 2 vCPUAMD EPYC Genoa 4ª geração 9xx4 com 3,25 GHz ou similar, na arquitetura Zen 4. AMD EPYC G4
  • 4 GB DDR5MEMÓRIA
  • 50 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

Genoa VPS.G4

$44.99 Save  22 %
$34.99 Mensalmente
  • 4 vCPUProcessador AMD EPYC com núcleos vCPU dedicados, em hardware de servidor empresarial. AMD EPYC G4
  • 8 GB DDR5MEMÓRIA
  • 100 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

Genoa VPS.G6

$89.99 Save  22 %
$69.99 Mensalmente
  • 8 vCPUProcessador AMD EPYC com núcleos vCPU dedicados, em hardware de servidor empresarial. AMD EPYC G4
  • 16 GB DDR5MEMÓRIA
  • 200 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

Genoa VPS.G7

$159.99 Save  22 %
$124.99 Mensalmente
  • 8 vCPUProcessador AMD EPYC com núcleos vCPU dedicados, em hardware de servidor empresarial. AMD EPYC G4
  • 32 GB DDR5MEMÓRIA
  • 250 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos. incluídos
  • Backup automático grátisInclui um espaço de backup que pode configurar para diário, semanal ou mensal.

AMD Ryzen VPS.R1

$16.99 Save  18 %
$13.99 Mensalmente
  • 1 CPU dedicado AMD Ryzen 9 7950X com 4,5 GHz ou similar, na arquitetura Zen 4. vCPU
  • 4 GB DDR5MEMÓRIA
  • 50 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6 incluídos O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos.
  • Backup automático incluído

AMD Ryzen VPS.R2

$29.99 Save  17 %
$24.99 Mensalmente
  • 2 CPU dedicados AMD Ryzen 9 7950X com 4,5 GHz ou similar, na arquitetura Zen 4. vCPU
  • 8 GB DDR5MEMÓRIA
  • 100 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6 incluídos O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos.
  • Backup automático incluído

AMD Ryzen VPS.R4

$109.99 Save  18 %
$89.99 Mensalmente
  • 8 CPU dedicados AMD Ryzen 9 7950X com 4,5 GHz ou similar, na arquitetura Zen 4. vCPU
  • 32 GB DDR5MEMÓRIA
  • 400 GB NVMeDISCO
  • Largura de banda ilimitada
  • IPv4 & IPv6 incluídos O suporte a IPv6 está indisponível de momento em França, Finlândia ou nos Países Baixos.
  • Backup automático incluído

Frequently asked questions

How do I uninstall Claude Code on Windows?

For a script install, delete the binary and version store from PowerShell: Remove-Item "$env:USERPROFILE\.local\bin\claude.exe" -Force and Remove-Item "$env:USERPROFILE\.local\share\claude" -Recurse -Force. WinGet installs go with winget uninstall Anthropic.ClaudeCode. Settings and session history sit separately under %USERPROFILE%\.claude, and the VS Code extension recreates that folder if it's still installed.