Hivra
You don't need WSL to start, and you don't need a Windows PC to keep it running.

Claude Code on Windows: install natively, in WSL, or on a Linux computer (as of November 2026)

Claude Code runs natively on Windows now, so the old advice to set up WSL first is out of date. Here is how to install it from PowerShell or CMD, when WSL is still the better choice, how to sign in, and how to fix the errors Windows users hit most.

Short answer

To run Claude Code on Windows, open PowerShell and run irm https://claude.ai/install.ps1 | iex, then type claude and sign in with a Pro, Max, Team, Enterprise or Console account. It needs Windows 10 version 1809 or later and 4 GB of RAM. Git for Windows is optional. WSL 2 is the choice when you want sandboxing.

The short version: native or WSL, and what each needs

Anthropic documents two ways to run Claude Code on a Windows PC, and a third place to run it that has nothing to do with your PC. Anthropic's setup page lays out the first two:

Where it runsWhat you needSandboxingBest for
Native Windows (PowerShell or CMD)Nothing extra. Git for Windows is optionalNot supportedWindows-native projects and tools
WSL 2WSL 2 turned onSupportedLinux toolchains, or when you want sandboxed command execution
WSL 1WSL 1 turned onNot supportedOnly if WSL 2 isn't available to you

Many Windows users never need more than the first row. If your code is a .NET app, a Node project you edit in VS Code, or anything that builds on Windows, install natively and get on with your day. If your project is built for Linux, or you want Anthropic's sandbox, use WSL 2. The rest of this guide covers both, then what to do when you want Claude Code running somewhere other than your PC. If you'd rather run it on a computer that stays on, Claude Code on Hivra comes with the official CLI already installed.

System requirements

From Anthropic's setup page, as of November 2026:

  • Operating system: Windows 10 version 1809 or later, or Windows Server 2019 or later.
  • Hardware: 4 GB of RAM or more, and an x64 or ARM64 processor.
  • Network: an internet connection.
  • Shell: PowerShell or CMD for native Windows, or Bash inside WSL.
  • Location: one of Anthropic's supported countries.
  • Account: a Pro, Max, Ultra, Team, Enterprise or Console account. The free claude.ai plan does not include Claude Code.

Git for Windows is not on the requirements list. It is optional, and the next section explains what it changes. If you are weighing which paid plan to get, see our guide to Claude Code pricing: Pro vs Max, and when API billing is cheaper.

Install Claude Code natively on Windows

This is the route Anthropic recommends for Windows. You do not need to run as Administrator.

Step 1: open the right terminal. Press Win + X and choose Windows PowerShell or Terminal. Your prompt starts with PS C:\Users\YourName> in PowerShell. In CMD it shows C:\Users\YourName> without the PS. The two take different install commands, and mixing them up is the most common first error.

Step 2: run the installer. 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 command shows no progress while it downloads, so leave the window open until it finishes. Anthropic's terminal guide says you'll see "Claude Code successfully installed!" when it's done.

Step 3: check it worked. Open a new terminal window and run:

claude --version

A working install prints a version number such as 2.1.211 (Claude Code). For a fuller check, claude doctor prints read-only diagnostics about the install and your settings without starting a session.

Step 4: start it in your project. cd into a project folder and run claude. The first run opens a browser window to sign in, covered below.

Git for Windows is optional, but Anthropic recommends it. It provides Git Bash, which Claude Code's Bash tool needs. Without it, Claude Code runs shell commands through its PowerShell tool instead. With it installed, Claude Code uses Git Bash, and the PowerShell tool is available alongside. If you install Git for Windows, select "Add to PATH" during setup. If Claude Code can't find Git Bash, add this to your settings.json:

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

Updates. Native installs update themselves in the background and the new version takes effect the next time you start Claude Code. To update by hand, run claude update.

Install Claude Code in WSL

Anthropic's instruction is short: open your WSL distribution and run the Linux installer, then launch claude inside the WSL terminal, not from PowerShell or CMD. The Linux installer is:

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

Choose WSL 2 over WSL 1 if you can. WSL 2 supports Claude Code's sandboxing, and Anthropic's sandboxing page says that on native Windows Claude Code runs commands unsandboxed, so WSL 2 is the way to get the sandbox on a Windows machine. WSL 1 is also hit by a known native-binary regression: if claude prints cannot execute binary file: Exec format error, Anthropic's fix is to convert the distribution from PowerShell with wsl --set-version <DistroName> 2.

Keep your project on the Linux side. Anthropic's troubleshooting page warns that reading across the Windows and Linux file systems on WSL can make search return fewer results than expected. Its advice is to keep the project under /home/ rather than /mnt/c/, or to use native Windows if the project has to live on the Windows drive. Inside WSL everything works as it does on a Linux machine, so Claude Code on Linux covers the Linux-side errors, ripgrep and tmux in more depth.

If you prefer a graphical app, there is also a Claude desktop app for Windows (with an ARM64 installer), and it can run sessions inside a WSL 2 distribution. That is a separate download from the terminal install above, and the desktop quickstart covers it.

npm and WinGet: the other install routes

Anthropic's page lists two more routes for Windows. Neither is the recommended one, and both exist for specific situations.

npm needs Node.js 22 or later and installs the same native binary as the standalone installer:

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

Upgrade with npm install -g @anthropic-ai/claude-code@latest. Anthropic says to avoid npm update -g, which may not move you to the newest release, and never to use sudo npm install -g. On Windows, npm creates .ps1 launcher scripts that PowerShell's execution policy can block, which is the running scripts is disabled on this system error covered in the fixes below. Also check npm --version first: npm 12 skips Claude Code's postinstall step by default, which leaves claude failing with Error: claude native binary not installed. or a launcher Windows can't run. Anthropic's npm 12 fix is to use the native installer instead or allow the step.

WinGet installs with winget install Anthropic.ClaudeCode. WinGet installs do not auto-update. Run winget upgrade Anthropic.ClaudeCode now and then, or set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1 and let Claude Code run the upgrade in the background. The upgrade can fail while Claude Code is running because Windows locks the file, in which case Claude Code shows you the command to run by hand.

If you only want the least maintenance, pick the native installer. It's the one Anthropic marks as recommended and the one that updates itself.

Signing in

Run claude and follow the browser prompts. A browser window opens, you sign in with your Anthropic account, and the terminal picks up the login. You need a Pro, Max, Ultra, Team, Enterprise or Console account, because the free claude.ai plan doesn't include Claude Code.

If you have an ANTHROPIC_API_KEY environment variable set and you approve the key when Claude Code asks, it skips the login prompt and uses that key instead of your subscription login. Usage then goes to the Console account that owns the key, not your Pro or Max plan. You can also point Claude Code at Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry instead of an Anthropic account. Anthropic's authentication page covers every account type and team setup.

Common Windows problems and the fixes Anthropic documents

Most Windows trouble comes down to the wrong shell, a missing PATH entry, or a policy that blocks scripts. Anthropic's installation troubleshooting page has the full list. These are the ones you are most likely to meet.

irm is not recognized. You are in CMD, not PowerShell. Open PowerShell from the Start menu and run irm https://claude.ai/install.ps1 | iex, or use the CMD command shown earlier.

The token '&&' is not a valid statement separator. The opposite mistake: you pasted the CMD command into PowerShell. Use the PowerShell command.

A parameter cannot be found that matches parameter name 'fsSL', or bash not recognized. You ran the macOS and Linux command on Windows. In PowerShell, curl is an alias for Invoke-WebRequest and rejects those flags. Use the PowerShell installer.

The install command prints script text and nothing installs. In CMD, the curl command without -o install.cmd prints the script instead of saving it. Run the complete command, including -o install.cmd && install.cmd && del install.cmd.

'claude' is not recognized after a clean install. This is the PATH problem. The installer puts claude.exe in %USERPROFILE%\.local\bin. Check it is there:

Test-Path "$env:USERPROFILE\.local\bin\claude.exe"

If that prints True but claude still isn't found, add the folder to your User PATH in PowerShell:

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

Then open a new terminal. A window that was already open keeps its old PATH, and so does a terminal built into an editor such as VS Code, so quit and reopen the editor too.

'claude' is not recognized right after an update. To update on Windows, Claude Code renames the old claude.exe aside and moves the new one in. If that move fails, the folder can be left with only a backup named claude.exe.old. followed by a timestamp. Anthropic's fix, in PowerShell:

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

If there is no backup file, run the installer again.

The process cannot access the file ... because it is being used by another process. A previous install attempt is still running, or antivirus is scanning a half-downloaded file. Close other PowerShell windows, wait for the scan to finish, then clear the downloads folder and retry:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\downloads" irm https://claude.ai/install.ps1 | iex

running scripts is disabled on this system. This shows up with npm installs. PowerShell's execution policy is blocking the .ps1 launchers npm creates. The PowerShell installer is not affected, because it runs downloaded text directly. Anthropic's options are to allow locally created scripts for your user with Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, to call claude.cmd instead of claude, or to switch to the PowerShell installer.

Claude Code on Windows requires either Git for Windows (for bash) or PowerShell. Neither shell was found. If PowerShell is missing from your PATH, add C:\Windows\System32\WindowsPowerShell\v1.0\ to it, or install PowerShell 7. Alternatively install Git for Windows with "Add to PATH" selected and restart your terminal.

TLS or certificate errors on a work network. Corporate proxies often cause these. Anthropic's page covers them in detail: add your proxy's certificate to the Windows certificate store and run the PowerShell installer, or, if the failing step is the CMD curl download, rerun it with --ssl-revoke-best-effort. That is your IT team's call, so follow the page rather than a forum post.

Line endings, paths and permissions

Three Windows habits cause trouble that no installer fixes. Anthropic's pages don't cover the first two directly, so treat the following as general Git and Windows practice, not Claude Code settings.

Line endings. Windows text files often use CRLF, and Linux tools and many shell scripts expect LF. Git can convert between the two: with core.autocrlf set to true, Git converts CRLF to LF on commit and LF to CRLF on checkout, as the git-config documentation describes. That is the right default for a repo you only touch on Windows. If the same repo is also used from WSL or a Linux machine, agree on one setting for the whole team, or Claude Code will show you diffs where every line has changed.

Paths. Windows uses backslashes and drive letters, WSL sees the same drive at /mnt/c/, and Git Bash writes paths in a third style. When you paste a path into a prompt, use the style of the shell Claude Code is running in. The simplest way to avoid mix-ups is to pick one place for each project and stay there. In WSL that means the Linux file system, for the speed and search reasons given earlier.

Permissions. Claude Code asks before it edits files or runs commands, in every setup. That is the main safety net, and it matters more on Windows because native Windows has no sandbox to fall back on. If a command fails with access denied, the first thing to check is whether the folder is one your user can write to. The installer itself writes under your user profile, which is writable by default, so it needs no Administrator rights.

The catch with any Windows PC: it sleeps

Native or WSL, Claude Code is running on a computer that you also use for everything else. That has one big consequence: when the PC sleeps, hibernates, restarts for an update or loses power, the session stops. WSL stops with Windows, and a terminal on a laptop stops with the lid.

For a quick bug fix or a pairing session that doesn't matter. For a long refactor, a big test run or anything you'd like to check from your phone later, it does. You can tweak power settings to stop the PC sleeping, but that's fighting the machine's job. The cleaner answer is to run Claude Code on a Linux computer that is meant to stay on, and reach it from your PC.

There are guides on our blog for that situation: how to keep Claude Code running 24/7, how Remote Control works and how to keep it online, and using Claude Code from your phone.

Native Windows vs WSL vs a remote Linux computer

Native WindowsWSL 2Remote Linux computer
SetupOne PowerShell or CMD commandTurn on WSL 2, then the Linux installerRent or provision a machine, then the Linux installer
SandboxingNot supportedSupportedSupported on Linux
Best project locationWindows driveLinux file system under /home/The machine's own disk
Keeps going when your PC sleepsNoNoYes, if the machine stays on and you start long runs inside tmux
Good forWindows-native projects and toolsLinux toolchains and sandboxingLong-running jobs and reaching your work from any device
Ongoing upkeepSelf-updatingSelf-updating, plus WSL itselfOS, updates, access and security are yours, unless it is managed

The honest takeaway is that for many Windows users, native or WSL is enough. If you open a terminal, work with Claude Code while you are at your desk, and close it when you leave, a remote machine adds nothing you need. The remote option earns its keep when work should continue without your PC, or when you want one environment you can open from a laptop, a desktop and a phone.

A Linux computer for Claude Code on Hivra

If the sleeping PC is your problem, Hivra gives Claude Code a ready Linux computer of its own. You launch Claude Code from the dashboard and the official Anthropic CLI is already installed, so there is no WSL to turn on, no installer to run and no PATH to fix. You reach its terminal and files from a browser on your PC, your phone or a borrowed laptop.

The computer stays on when your PC goes to sleep. It keeps your files, sessions and login, and a Claude Code run you start inside tmux in the computer's Terminal tab keeps going after you close the laptop. On Claude Code, work you send through Telegram, connected in the agent's Telegram tab, runs on the computer, not in your browser. Plans start at $9.99 a month for 2 vCPU and 4 GB of RAM. You sign in with your own Anthropic account on the computer, so Hivra hosting does not include or replace a Claude subscription. Hivra is not affiliated with Anthropic.

You aren't locked into one agent. The same Hivra account launches Hermes, OpenClaw, Claude Code, Codex and Agent Zero, each on a computer of its own, and you reach all of them from a browser on any device. If you want to try Codex next to Claude Code, you don't need a second setup.

Where another option fits better. If you work at your desk and your project lives on your PC, native or WSL is simpler and costs nothing extra beyond your Claude account. Typing into a terminal in a phone browser is still typing into a terminal. And Hivra administrators retain infrastructure access to the managed computers, so keep truly secret material off a hosted machine.

Launch Claude Code on Hivra if you want it running on a computer that doesn't sleep when your PC does.

Which one should you pick?

Pick native Windows if your projects and tools live on Windows and you want to be running in a couple of minutes of typing, not hours of setup. Install Git for Windows if you want the Bash tool.

Pick WSL 2 if your code targets Linux, you want sandboxed command execution, or your team's scripts assume a Linux shell. Keep the project in /home/.

Pick a remote Linux computer, such as one on Hivra, when Claude Code has to carry on after your PC sleeps, or when you want to reach the same workspace from more than one device.

These are not exclusive. Plenty of people use native Claude Code for quick tasks at their desk and a remote computer for the long ones.

Common questions

Can you run Claude Code on Windows?

Yes. Claude Code runs natively on Windows 10 version 1809 or later and Windows Server 2019 or later. Open PowerShell and run irm https://claude.ai/install.ps1 | iex, or use the CMD command from Anthropic's setup page. You can also run it inside WSL.

Do I need WSL to use Claude Code on Windows?

No. Native Windows is supported, and Anthropic recommends the native installer. WSL 2 is worth choosing if your project needs Linux tools or you want Claude Code's sandboxing, which native Windows does not support.

Do I need Git for Windows to run Claude Code?

No, it is optional. Without it, Claude Code runs shell commands through its PowerShell tool. With it installed, Claude Code uses Git Bash for the Bash tool. If it can't find Git Bash, set CLAUDE_CODE_GIT_BASH_PATH in settings.json.

What are the system requirements for Claude Code on Windows?

Windows 10 version 1809 or later or Windows Server 2019 or later, 4 GB of RAM or more, an x64 or ARM64 processor, an internet connection, and PowerShell or CMD. You also need a Pro, Max, Ultra, Team, Enterprise or Console account.

Why does Windows say 'claude' is not recognized?

The install folder is not on your PATH yet. The installer puts claude.exe in %USERPROFILE%\.local\bin. Add that folder to your User PATH, then open a new terminal, because windows that were already open keep the old PATH. Anthropic's troubleshooting page has the exact PowerShell commands.

Is Claude Code free on Windows?

The software installs for free, but using it needs a Pro, Max, Ultra, Team, Enterprise or Console account. The free claude.ai plan does not include Claude Code. See our Pro vs Max guide for how the plans compare.

Should I install Claude Code with npm or the native installer?

Use the native installer unless you have a reason not to. npm needs Node.js 22 or later and, on Windows, can hit a PowerShell execution policy error. The native installer updates itself, while npm and WinGet installs are updated by you.

Does Claude Code keep running when my Windows PC sleeps?

No. Native and WSL sessions run on your PC, so they stop when it sleeps or shuts down. To keep a long job going, run Claude Code on a Linux computer that stays on, and start the run inside tmux. A managed computer such as Hivra's removes the server upkeep.

Can I use Claude Code on Windows without the terminal?

Yes. Anthropic offers a Claude desktop app for Windows, including an ARM64 installer, which can run Claude Code sessions without you typing commands. It can also run sessions inside a WSL 2 distribution.

Give your agent a computer that stays on.

From $9.99/mo. Bring your own AI key. 7-day money-back guarantee on card payments.

Start Now