Guide

Claude Code on Windows: install it natively or in WSL

Claude Code runs straight on Windows 10 and 11. You don't need WSL or administrator rights. Here are the official install commands, the choices that matter, and how to check that it worked.

Dennis runs several projects at once with Claude Code and Codex. He built Project HQ to see them all on one screen.

The short answer

Open PowerShell. You don't need to open it as administrator. Then run Anthropic's installer:

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

Next, open a new terminal window. Type claude --version to check the install. Go to a project folder and type claude. You need Windows 10 version 1809 or later. You also need a Pro, Max, Team, Enterprise or Console account. Both come from the setup page.

If you can, also install Git for Windows. You don't have to. But it gives Claude Code a Bash shell, a second way to run commands. Without it, Claude Code uses PowerShell.

Requirements

This list is from Anthropic's setup page:

  • Windows 10 1809 or later, or Windows Server 2019 or later
  • 4 GB of RAM or more, an x64 or ARM64 processor
  • An internet connection
  • PowerShell or CMD (or Bash in WSL)
  • A paid Claude plan (Pro, Max, Team or Enterprise) or a Console account. The free Claude plan does not include Claude Code.

Native Windows or WSL?

You can run Claude Code straight on Windows. Or you can run it inside WSL, short for Windows Subsystem for Linux: a Linux system that runs inside Windows. Here is how Anthropic compares them:

OptionNeedsSandboxingGood for
Native WindowsNothing; Git for Windows optionalNot supportedWindows projects and tools
WSL 2WSL 2 enabledSupportedLinux toolchains, sandboxed commands
WSL 1WSL 1 enabledNot supportedWhen WSL 2 isn't available

Sandboxing means Claude Code runs commands with limited access to your files and the network. Are your projects normal folders on your Windows drive? Then native Windows is the simpler choice.

My experience

I run Claude Code and Codex on a Windows PC every day. Most of my work runs fine on Windows itself. Some builds go more smoothly in Ubuntu through WSL. The deploys of my directory websites are one example.

Install on native Windows

Pick one way. All three come from Anthropic's setup page.

PowerShell (your prompt starts with PS C:\):

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

CMD (your prompt starts with C:\ without PS):

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

WinGet:

winget install Anthropic.ClaudeCode

The installer shows no progress while it downloads. You don't need to run it as administrator. Installs from PowerShell or CMD update themselves in the background. A WinGet install does not. So run winget upgrade Anthropic.ClaudeCode now and then.

Two errors tell you that you are in the wrong shell. "The token '&&' is not a valid statement separator" means you are in PowerShell, not CMD. "'irm' is not recognized" means you are in CMD, not PowerShell.

Git Bash or PowerShell?

With Git for Windows, Claude Code uses Git Bash for its Bash tool. Its PowerShell tool works next to it. Without Git for Windows, Claude Code runs commands through PowerShell. Can't Claude Code find Git Bash? Then tell it where Git Bash is, in your settings.json:

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

Check that it works

claude --version
claude doctor

The first prints a version number. The second checks your install and settings without changing them. It suggests fixes when it finds a problem. Does Windows say it doesn't know claude? Open a new terminal window first. Still no luck? Then the install folder isn't on your PATH yet, the list of places Windows looks for programs. The setup page links to the fix.

The first time you run claude, it asks you to log in through your browser.

Install in WSL instead

Microsoft's command installs WSL with Ubuntu, a common Linux version. Run it in PowerShell as administrator. Then restart your PC. You need Windows 10 version 2004 (build 19041) or later, or Windows 11. That is from Microsoft's page Install WSL.

wsl --install

Then open your Linux system. Run the Linux installer inside it, not from PowerShell. That is the advice on the setup page.

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

Prefer an app over the terminal?

The Claude desktop app has a Windows installer for x64 PCs and a separate one for ARM64 PCs. The app includes Claude Code. So you don't need to install the command-line tool as well. Sign in and open the Code tab, says the Claude Code overview. The app needs a paid plan.

Codex CLI and app on Windows

OpenAI's Codex has two choices on Windows.

The Codex CLI is a tool you run by typing commands. Its README on GitHub has this PowerShell installer. It also lists npm install -g @openai/codex.

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

The Windows app comes from the Microsoft Store. You can also get it with winget install --id 9PLM9XGG6VKS -s msstore. By default, its agent runs commands in PowerShell. In Settings you can switch it to WSL2; restart the app after that. When the agent runs in PowerShell, the app has its own Windows sandbox. This is all on OpenAI's page Codex on Windows.

Does PowerShell refuse to run scripts ("running scripts is disabled on this system")? OpenAI's page names Set-ExecutionPolicy -ExecutionPolicy RemoteSigned as a common fix. It also says to read Microsoft's guide on this setting first.

Next steps

Once it runs, add a short CLAUDE.md to each project. Then Claude knows your commands and rules. Next, read the best practices on planning, checks and running several sessions. The guide to Claude Code's interfaces compares the terminal, the editor add-ons and the desktop app.

Where Project HQ fits

Project HQ runs on Windows too. It reads the project folders on your PC that Claude Code or Codex work in. It shows what's done, what's next and what's waiting on you. It runs locally, behind a password, and only accepts connections from your own PC.

Join the waitlist

See what Project HQ includes for €37 →