Skip to main content

How to Install and Use Claude Code on Windows (2026 Guide)

Claude Code runs natively on Windows. Step-by-step guide for native installation, WSL2 setup, and VS Code integration.

FHFinn Hillebrandt
AI Programming
How to Install and Use Claude Code on Windows (2026 Guide)
Links marked with * are affiliate links. If a purchase is made through such links, we receive a commission.

Claude Code on Windows? For a long time, the answer was: Only with WSL2.

That information is outdated. Claude Code runs natively on Windows. The native setup does not require WSL2 or a Linux distribution.

I use Claude Code daily myself (on macOS), but I have also tested it on multiple Windows machines. In this guide, I will walk you through both paths: the native installation (the right choice for most users) and the WSL2 installation (for those who need sandboxing or full Linux compatibility).

TL;DRKey Takeaways
  • Claude Code runs natively on Windows (install via PowerShell, CMD, or WinGet, no Node.js needed)
  • WSL2 is only needed for sandboxing or Linux compatibility
  • When using Linux tools in WSL, keep your project in the Linux file system rather than under /mnt/c/ when possible.

Does Claude Code Work on Windows?

Short answer: Yes.

Anthropic offers a native Windows installer. You do not need WSL2 or a Linux distribution for the native Windows setup. A single command in PowerShell is all it takes.

Before that, things were different. Claude Code only ran on macOS and Linux. Windows users had to take the detour through WSL2 (the Windows Subsystem for Linux, a Linux environment integrated into Windows). It worked, but it was cumbersome.

So you have two options:

  1. Native installation (recommended for about 80% of users)
  2. Installation via WSL2 (for sandboxing and Linux compatibility)

Let's figure out which path is right for you.

Native vs. WSL2: Which Path Should You Choose?

The native installation is the better choice for the vast majority of users. It is faster, simpler, and perfectly sufficient for everyday work.

However:

There is an important difference that hardly anyone mentions. Sandboxing (isolating Claude Code at the OS level so it can only access specific files and network resources) currently works only on macOS and Linux. And therefore also on WSL2. But not on native Windows.

If you work with sensitive projects or do not want to give Claude Code unrestricted access to your system, WSL2 is the safer path.

Here is an overview:

CriterionSetup effort
NativeAbout 2 minutes
WSL215 to 20 minutes
CriterionPerformance
NativeGood
WSL2Good (in Linux file system)
CriterionSandboxing (OS-level isolation)
NativeNot available
WSL2Yes
CriterionLinux script compatibility
NativeLimited
WSL2Full
CriterionVS Code integration
NativeDirect (extension)
WSL2Remote-WSL extension
CriterionBest for
NativeEveryday work, web dev, standard projects
WSL2Sensitive projects, Linux workflows

My recommendation: Start with the native installation. If you need sandboxing or Linux compatibility later, you can always add WSL2. Both can exist side by side.

Native Installation on Windows (Recommended)

The native installation is straightforward. According to Anthropic's system requirements, you need:

  • Windows 10 version 1809 or later, Windows Server 2019, or Windows 11
  • at least 4 GB of RAM and an x64 or ARM64 processor
  • an internet connection and a Claude account with Claude Code access

You do not need Node.js for the native installation. The installer downloads a standalone binary. Administrator rights are not required either.

Optional but recommended: Git for Windows. It includes Git Bash, which Claude Code uses for its Bash tool and Monitor tool. Without Git for Windows, Claude Code runs commands through its PowerShell tool.

3.1 Option A: Installation via PowerShell (Fastest Way)

Open PowerShell and run this command:

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

That is it. The command downloads the installer and runs it directly. It shows no progress while downloading, so do not panic.

Prefer the classic Command Prompt (CMD)? Use this command instead:

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

How to tell where you are: in PowerShell, the prompt starts with PS C:\, in CMD just with C:\. After installing, open a new terminal window and run claude --version to confirm it worked. The native installation then updates itself automatically in the background.

3.2 Option B: Installation via WinGet

If you use WinGet (the Windows package manager), it is just as easy:

winget install Anthropic.ClaudeCode

WinGet handles the rest. One difference from the PowerShell method: WinGet installations do not update automatically. Run winget upgrade Anthropic.ClaudeCode regularly to get new versions.

3.3 Option C: Use Claude Code in the Desktop App

Do not want to touch the terminal at all? Download the Claude desktop app for Windows from claude.com/download. It lets you use Claude Code through a graphical interface. For work in the terminal and VS Code, you still install it with option A or B.

3.4 Starting and Authenticating Claude Code

After installation, open a new terminal (PowerShell or CMD) and type:

claude

Claude Code starts and asks you to authenticate. You have two options:

  • Claude subscription: Claude Code uses your existing Claude account. Pro ($20/month billed monthly), Max, Ultra, Team, and Enterprise include access. The free plan does not.
  • Anthropic Console (API): for usage-based billing (useful for intensive or professional use)

Follow the instructions in the terminal. After authentication, you can start working right away.

Done!

Installation via WSL2 (for Sandboxing and Linux Workflows)

This path takes a bit more effort, but it is worth it in certain scenarios:

  • You work with sensitive projects and want to isolate Claude Code (sandboxing)
  • Your project uses Linux-specific shell scripts or tools
  • You work in a team that relies on Linux environments

Plan about 15 to 20 minutes for the initial setup.

4.1 Enable WSL2

Open PowerShell as Administrator (right-click the PowerShell icon, then select "Run as administrator") and run this command:

wsl --install

Windows installs WSL2 and Ubuntu as the default distribution. This can take a few minutes. Afterwards, you will be prompted to restart your computer.

4.2 Set Up Ubuntu

After the restart, Ubuntu opens automatically (or you launch it from the Start menu). On the first start, you create a username and password.

Then update the system:

sudo apt update && sudo apt upgrade -y

4.3 Install Claude Code

Inside WSL, simply use the Linux installer. Run the command in the Ubuntu terminal, not in PowerShell:

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

You do not need Node.js here either. If you still prefer npm (npm install -g @anthropic-ai/claude-code), Anthropic requires Node.js 22 or later, and you should never install the package with sudo. For most people, the installer above is easier because it keeps itself up to date.

And start it:

claude

Authentication works the same as with the native installation. You are redirected to a URL, sign in, and Claude Code is ready to use.

That is it!

Connecting VS Code with Claude Code on Windows

VS Code is the IDE that works best with Claude Code. The integration differs depending on whether you use the native or WSL2 installation.

5.1 Native Installation + VS Code

Setup is very simple:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Claude Code"
  4. Install the official extension from Anthropic

Done. You can now use Claude Code directly from VS Code without switching between windows.

5.2 WSL2 Installation + VS Code

With WSL2, you need one additional step:

  1. Install the "WSL" extension (by Microsoft) in VS Code
  2. Open VS Code with the command code . from your WSL2 terminal
  3. VS Code automatically connects to the WSL2 environment
  4. Claude Code then runs inside WSL2 while you use VS Code as usual on Windows

Native PowerShell support since v2.1.84

A small update that makes a big difference day to day. With Claude Code v2.1.84 (released on March 26, 2026), Anthropic introduced a native PowerShell tool.

What changes exactly?

Until then, Claude Code routed shell commands on Windows through Git Bash. That caused regular path issues because paths had to be translated between Windows and the MSYS layer. The new PowerShell tool spawns pwsh.exe (PowerShell 7) or powershell.exe (Windows PowerShell 5.1) directly. No translation layer, no path gymnastics.

Today you usually do not need to do anything. According to Anthropic's tools reference, this applies on Windows:

  • Without Git for Windows, the PowerShell tool is enabled automatically.
  • With Git for Windows, it is on by default for Claude subscriptions and Console accounts. The Bash tool stays available for POSIX scripts.
  • For Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry, you enable it with an environment variable.
$env:CLAUDE_CODE_USE_POWERSHELL_TOOL=1

Setting the value to 0 turns the tool off. When it is active, Claude treats PowerShell as the primary shell. That lets Claude run Azure CLI commands directly, manage local Windows services, and reach deeper into the Windows file system. By default, Claude Code starts PowerShell with -ExecutionPolicy Bypass, but only for its own process. Your company's Group Policies still apply. To respect the normal execution policy instead, set CLAUDE_CODE_POWERSHELL_RESPECT_EXECUTION_POLICY=1.

Common Problems and Solutions

Do not worry if something does not work right away. Here are the most common issues and how to fix them.

6.1 WSL2 Does Not Start ("Virtualization not enabled")

The problem:

WSL2 requires hardware-level virtualization. On many machines, this feature is disabled in the BIOS by default.

The solution:

Restart your computer and enter the BIOS (usually via F2, F10, or Delete during boot). Look for "Intel VT-x" or "AMD-V" and enable the option. Save, restart, done.

6.2 The "claude" Command Is Not Found

If your terminal says claude is not found or not recognized after installation, the install directory is not on your PATH yet. Open a new terminal window first. If that does not help, Anthropic's installation troubleshooting guide walks you through fixing the PATH.

For a diagnosis without starting a session, there is also this command:

claude doctor

It checks your installation, settings files, and updates, and suggests fixes for any warnings. A Node.js version problem can only occur with the npm installation, which requires Node.js 22 or later.

6.3 Permission Error (EACCES) on npm install

A classic on Linux and WSL2, but only if you use npm instead of the installer. npm tries to install globally but does not have permission.

The solution:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

After that, npm install -g works without sudo.

6.4 Windows Defender Blocks Claude Code

Windows Defender can incorrectly flag Claude Code as a threat. In that case, add an exception:

  1. Open Windows Security
  2. Go to "Virus & threat protection"
  3. Click "Manage settings"
  4. Scroll to "Exclusions" and add the Claude Code installation path

6.5 Network Issues Behind a Corporate Proxy

If you work in a corporate network with a proxy, WSL2 needs to know the proxy settings. Add the following lines to your ~/.bashrc (replace the URL with your proxy):

export http_proxy=http://proxy.company.com:8080
export https_proxy=http://proxy.company.com:8080

The native Windows installation reads the same standard environment variables. In PowerShell, set them for the current session like this:

$env:HTTPS_PROXY="http://proxy.company.com:8080"

To make it permanent, use the env block in %USERPROFILE%\.claude\settings.json. According to Anthropic's network documentation, Claude Code does not support SOCKS proxies. Corporate certificates in the Windows certificate store, on the other hand, are picked up automatically by the native installation.

6.6 Claude Code Is Extremely Slow (WSL2)

This is the most common performance trap with WSL2. And the fix is simple.

The problem:

You are working in /mnt/c/Users/YourName/, where WSL accesses the mounted Windows file system. Some Linux operations may be slower there than in WSL's Linux file system. Microsoft recommends keeping projects in the Linux file system when using Linux tools.

The solution:

Move your project to your home directory inside WSL2:

mkdir -p ~/projects
cp -r /mnt/c/Users/YourName/my-project ~/projects/
cd ~/projects/my-project

From now on, always work in ~/projects/. The speed difference is enormous.

Performance Tips for Windows

A few things that will noticeably improve your experience with Claude Code on Windows.

7.1 Use Windows Terminal Instead of CMD or PowerShell

If you are not using it already: Windows Terminal is the better choice. It supports tabs, can manage PowerShell and WSL2 in a single window, and looks significantly better.

7.2 Limit WSL2 Resources (Optional)

WSL2 can grab a lot of RAM by default. If your system only has 8 or 16 GB, it is worth capping that. Create a file at %USERPROFILE%\.wslconfig with the following content:

[wsl2]
memory=4GB
processors=2

Adjust the values to match your system. After saving, restart WSL2 with wsl --shutdown and reopen it.

7.3 Set Up CLAUDE.md

Regardless of whether you work natively or via WSL2: Create a CLAUDE.md file in your project directory. In it, describe your project, conventions, and important commands. Claude Code reads this file automatically and works much more effectively as a result.

What exactly belongs in the CLAUDE.md and how to set it up optimally is covered in detail in the Claude Code guide.

7.4 Know the Essential Commands

For getting started, a few commands are enough:

  • claude starts Claude Code in the current directory
  • claude "Your task" starts directly with a specific prompt
  • /help shows all available commands
  • /compact compresses the context (saves tokens)

A complete overview of all commands can be found in our Claude Code command reference.

Frequently Asked Questions

Yes. Claude Code runs natively on Windows, and WSL2 is a separate option for Linux toolchains or sandboxed command execution. Git for Windows is optional for the Bash tool; without it, Claude Code uses its PowerShell tool.

In PowerShell, run Anthropic’s native installer:

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

Alternatively, install Claude Code with WinGet:

winget install Anthropic.ClaudeCode

After installation finishes, open a new terminal and run:

claude

Both methods work on Windows 10 (version 1809 or later) and Windows 11. Node.js is not required.

Windows Terminal is a practical choice because it supports tabs and can manage PowerShell and WSL2 in one window. You can also start Claude Code from the integrated terminal in VS Code.

No. Claude Code runs natively on Windows. Git for Windows is optional. Without Git Bash, Claude Code uses the PowerShell tool; with Git Bash, the Bash tool is available. WSL2 is a separate option for Linux toolchains or sandboxed command execution.

Anthropic lists Windows 10 version 1809 or later, or Windows Server 2019 or later, as the minimum. Windows 11 is also supported.

Claude Code is not included in Claude's free plan. Anthropic lists Pro, Max, Ultra, Team, and Enterprise as eligible access options. You can also use the Console/API or a supported cloud provider, which bills usage separately. These access requirements do not change on Windows. For a breakdown of plan and API costs, see my Claude Code pricing guide.

Both work. Use the official VS Code extension if you want Claude Code inside your editor; you can also start it from VS Code’s integrated terminal. Choose a standalone terminal if you prefer a shell-first workflow.

If your project is under /mnt/c/, WSL is accessing the mounted Windows file system. Microsoft recommends keeping project files in WSL's Linux file system when using Linux command-line tools. Try placing the project under ~/projects/ and compare performance there.

You can use Claude Code natively on Windows and separately in WSL. Start each installation from its matching environment. Native Windows fits Windows projects and tools; WSL fits Linux toolchains or sandboxed command execution.
FH

Finn Hillebrandt

AI Expert & Blogger

Finn Hillebrandt is the founder of Gradually AI, an SEO and AI expert. He helps online entrepreneurs simplify and automate their processes and marketing with AI. Finn shares his knowledge here on the blog in 50+ articles as well as through the AI Business Club.

Learn more about Finn and the team, follow Finn on LinkedIn, join his Facebook group for ChatGPT, OpenAI & AI Tools or do like 17,500+ others and subscribe to his AI Newsletter with tips, news and offers about AI tools and online business. Also visit his other blog, Blogmojo, which is about WordPress, blogging and SEO.