Claude Code on Windows: Native, WSL 2, or a Cloud Mac
·7 min read
Short answer: yes, Claude Code runs on Windows, natively, with no WSL required. It supports Windows 10 (1809 or later), Windows 11 and Windows Server 2019 and later, from PowerShell, CMD or Git Bash. The questions worth a page are which of the three setups to pick, what the typical install errors mean, and what to do when the project itself needs macOS. This guide covers all three.
Option 1: Native Windows (the default)
Open a terminal and run the installer for the shell you are in. Your prompt tells you which one: PS C:\ is PowerShell, a bare C:\ is CMD.
- PowerShell:
irm https://claude.ai/install.ps1 | iex - CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd - WinGet, if you prefer a package manager:
winget install Anthropic.ClaudeCode(no auto-updates; runwinget upgrade Anthropic.ClaudeCodeyourself)
The installer shows no progress while downloading, which is normal. No administrator rights are needed. When it finishes, open a new terminal window and run claude --version. A version number means it worked; "claude is not recognized" means the install directory is not on your PATH yet, which the new window usually fixes. claude doctor prints a full health check if something still looks off.
Then run claude inside a project folder and sign in through the browser prompt. Claude Code needs a Pro, Max, Team, Enterprise or Console account; the free claude.ai plan does not include it.
Install Git for Windows, even if you use PowerShell
This is the step most Windows guides skip and the cause of most "it behaves differently on Windows" complaints. Claude Code's Bash tool, the one it uses to run commands, needs Git Bash. Without Git for Windows installed, Claude Code falls back to a PowerShell tool, which works but means every shell snippet it has learned from Unix-shaped documentation runs through a different shell. Install Git for Windows from git-scm.com and the Bash tool is used automatically. If Claude Code cannot find it, point it there in settings.json: {"env": {"CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"}}.
Option 2: WSL 2
Inside a WSL distribution, Claude Code is a Linux install: open the WSL terminal and run curl -fsSL https://claude.ai/install.sh | bash. You install and launch claude from inside WSL, not from PowerShell. Pick WSL 2 when:
- your project's toolchain is Linux-first (Docker, Python with native extensions, anything that assumes a Unix shell), or
- you want sandboxed command execution. Claude Code's sandboxing, which fences what the agent can touch, is supported in WSL 2 and not on native Windows or WSL 1.
One rule saves a lot of pain: keep the repository inside the Linux filesystem (your WSL home), not under /mnt/c. Cross-filesystem access in WSL is slow, and an agent that reads hundreds of files per task feels it more than you do.
The errors people actually hit
- "The token '&&' is not a valid statement separator": you pasted the CMD command into PowerShell. Use the
irmone-liner instead. - "'irm' is not recognized": the reverse, PowerShell command in CMD.
- "claude is not recognized" after install: PATH not refreshed. Open a new terminal; if it persists, Anthropic's troubleshooting page has the fix for each shell.
- Commands behave oddly or Bash tool missing: Git for Windows is not installed, see above.
- Slow file operations in WSL: the repo lives on
/mnt/c. Move it into the Linux filesystem. - Sandboxing unavailable: expected on native Windows. Use WSL 2 if you need it.
Option 3: A cloud Mac, when the project needs macOS
Claude Code runs on Windows; Xcode does not. If the agent's job is to build, test or ship an iOS or macOS app, it needs xcodebuild, the iOS Simulator and Apple's signing tools, and those only exist on macOS. The usual Windows answer, a hackintosh or a macOS VM, breaks Apple's licence and tends to break on updates. The clean answer is a Mac you reach over the network.
With a dedicated cloud Mac you keep your Windows PC and get a Mac Mini M4 or M6 in a data center: SSH in from PowerShell, run Claude Code there in tmux, and open Xcode or the Simulator over RustDesk or VNC when you want to see the app. It also solves a second problem Windows laptops share with every laptop: the agent keeps working after you close the lid, on a machine that holds none of your personal files. The server setup guide has every command. On MacRent that is $15 for a day, $89 for a week or $159 for a month, with the machine on around the clock; your Claude plan stays your own.
Which one should you pick?
- Windows-native project (.NET, Unity, PowerShell tooling, Windows apps): native install plus Git for Windows.
- Linux-shaped project, or you want sandboxing: WSL 2, repo inside the Linux filesystem.
- iOS or macOS project, or an agent that should run 24/7 off your laptop: Claude Code on a Mac, rented if you do not own one.
- Prefer no terminal at all: the Claude desktop app for Windows includes Claude Code with a graphical interface.
For Windows developers who already live the macOS gap, our guides on running Xcode from Windows and building an iOS app without a Mac cover the rest of the toolchain.
Frequently asked questions
Does Claude Code work on Windows 11?
Yes. Claude Code supports Windows 10 version 1809 and later, Windows 11 and Windows Server 2019 and later, natively in PowerShell, CMD or Git Bash. WSL 2 is optional, not required.
Do I need WSL to run Claude Code?
No. The native installer works from PowerShell or CMD. WSL 2 is worth it when your project depends on a Linux toolchain, or when you want Claude Code's sandboxed command execution, which is only supported inside WSL 2.
Can I use Claude Code for iOS development on Windows?
Claude Code itself runs fine on Windows, but Xcode, the iOS Simulator and App Store uploads only exist on macOS. For an iOS project, run Claude Code on a Mac, a rented cloud Mac if you do not own one, and connect from your PC over SSH or remote desktop.
Is there a Claude Code app for Windows without the terminal?
Yes. The Claude desktop app for Windows includes Claude Code with a graphical interface, so you can use it without opening PowerShell. The terminal version and the desktop app share the same account and settings directory.
Need a Mac without buying one?
Rent a dedicated Mac Mini M4 in the cloud from $15/day. Full-admin access, ready in minutes, cancel anytime.
Rent a Mac