Skip to main content
gradually.ai logogradually.ai
  • Blog
  • About Us
AI Newsletter
AI Newsletter
  1. Home
  2. AI Blog

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

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

FHFinn Hillebrandt
March 19, 2026
Auf Deutsch lesen
AI Programming
How to Install and Use Claude Code on Windows (2026 Guide)
𝕏XShare on XFacebookShare on FacebookLinkedInShare on LinkedInPinterestShare on PinterestThreadsShare on ThreadsFlipboardShare on Flipboard
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. Since late 2025, Claude Code runs natively on Windows. No WSL2, no Linux, no workarounds. Installation takes less than 2 minutes.

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 since late 2025 (PowerShell, WinGet, or installer)
  • WSL2 is only needed for sandboxing or Linux compatibility
  • Important with WSL2: Always work in the Linux file system, never in /mnt/c/ (9x faster)

Does Claude Code Work on Windows?

Short answer: Yes.

Since late 2025, Anthropic offers a native Windows installer. You do not need WSL2 or a Linux distribution. 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.

Note
Our complete Claude Code guide covers everything about general usage. This article focuses specifically on the Windows installation.

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:

Criterion
Native
WSL2
Setup effortAbout 2 minutes15 to 20 minutes
PerformanceGoodGood (in Linux file system)
Sandboxing (OS-level isolation)Not availableYes
Linux script compatibilityLimitedFull
VS Code integrationDirect (extension)Remote-WSL extension
Best forEveryday work, web dev, standard projectsSensitive 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. You need two things:

  • Windows 10 (version 1903 or newer) or Windows 11
  • Node.js 18 or newer

If you are not sure whether Node.js is installed, open PowerShell and type the following command:

node --version

If a version number appears (e.g. v20.11.0), you are good to go. If not, download Node.js from nodejs.org and install the LTS version.

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. After a few seconds, Claude Code is ready to use.

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. The advantage: future updates can be done with winget upgrade Anthropic.ClaudeCode.

3.3 Option C: Download the Installer from claude.ai

If you prefer a traditional installer, go to claude.ai/download and download the Windows version. Double-click, done.

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 Pro subscription: Claude Code uses your existing Claude account ($20/month, simplest option)
  • API key: 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!

Tip
For a detailed introduction to using Claude Code (commands, workflows, setting up CLAUDE.md), check out our complete Claude Code guide.

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.

Warning
If the command fails, virtualization may be disabled in your BIOS. You can find the solution in the troubleshooting section below.

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 Node.js (via nvm)

I recommend installing via nvm (Node Version Manager). This lets you easily switch between Node.js versions later.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash

Close the terminal and reopen it. Then install the current LTS version:

nvm install --lts

Verify the installation:

node --version

4.4 Install Claude Code

Now install Claude Code globally via npm:

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

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
Tip
You can start Claude Code directly from the integrated terminal in VS Code. For everyday work, this is the fastest workflow.

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 Node.js Version Too Old

Claude Code requires at least Node.js 18. If you have an older version:

nvm install --lts
nvm use --lts

If you do not use nvm, uninstall the old version and download the current LTS from nodejs.org.

6.3 Permission Error (EACCES) on npm install

A classic on Linux and WSL2. 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

For the native installation on Windows, Claude Code typically picks up the system proxy settings automatically.

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/. That is the Windows file system, connected through a slow bridge. The native Linux file system is up to 9x faster.

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.

FAQ

Frequently Asked Questions

𝕏XShare on XFacebookShare on FacebookLinkedInShare on LinkedInPinterestShare on PinterestThreadsShare on ThreadsFlipboardShare on Flipboard
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 his ChatGPT Course and 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.

Similar Articles

OpenAI Codex Statistics 2026: Key Numbers, Data & Facts
AI Programming

OpenAI Codex Statistics 2026: Key Numbers, Data & Facts

April 10, 2026
FHFinn Hillebrandt
How to Use Claude Code for Free (And What the Limits Are)
AI Programming

How to Use Claude Code for Free (And What the Limits Are)

March 19, 2026
FHFinn Hillebrandt
Claude Code Pricing: How Much Does Claude Code Really Cost?
AI Programming

Claude Code Pricing: How Much Does Claude Code Really Cost?

March 19, 2026
FHFinn Hillebrandt
Claude Code Commands: The Ultimate Reference
AI Programming

Claude Code Commands: The Ultimate Reference

March 15, 2026
FHFinn Hillebrandt
Claude Code Statistics 2026: Key Numbers, Data & Facts
AI Programming

Claude Code Statistics 2026: Key Numbers, Data & Facts

March 15, 2026
FHFinn Hillebrandt
How to Create the Perfect AGENTS.md (incl. Template)
AI Programming

How to Create the Perfect AGENTS.md (incl. Template)

March 13, 2026
FHFinn Hillebrandt

Stay Updated with the AI Newsletter

Get the latest AI tools, tutorials, and exclusive tips delivered to your inbox weekly

Unsubscribe anytime. About 4 to 8 emails per month. Consent includes notes on revocation, service provider, and statistics according to our Privacy Policy.

gradually.ai logogradually.ai

Germany's leading platform for AI tools and knowledge for online entrepreneurs.

AI Tools

  • AI Chat
  • ChatGPT in German
  • Text Generator
  • Prompt Enhancer
  • Prompt Link Generator
  • FLUX AI Image Generator
  • AI Art Generator
  • Midjourney Prompt Generator
  • Veo 3 Prompt Generator
  • AI Humanizer
  • AI Text Detector
  • Gemini Watermark Remover
  • All Tools →

Creative Tools

  • Blog Name Generator
  • AI Book Title Generator
  • Song Lyrics Generator
  • Artist Name Generator
  • Team Name Generator
  • AI Mindmap Generator
  • Headline Generator
  • Company Name Generator
  • AI Slogan Generator
  • Brand Name Generator
  • Newsletter Name Generator
  • YouTube Channel Name Generator

Business Tools

  • API Cost Calculator
  • Token Counter
  • AI Ad Generator
  • AI Copy Generator
  • Essay Generator
  • Story Generator
  • AI Rewrite Generator
  • Blog Post Generator
  • Meta Description Generator
  • AI Email Generator
  • Email Subject Line Generator
  • Instagram Bio Generator
  • AI Hashtag Generator

Resources

  • Claude Code MCP Servers
  • Claude Code Skills
  • n8n Hosting Comparison
  • OpenClaw Hosting Comparison
  • Claude Code Plugins
  • Claude Code Use Cases
  • Claude Cowork Use Cases
  • OpenClaw Use Cases
  • Changelogs

© 2025 Gradually AI. All rights reserved.

  • Blog
  • About Us
  • Legal Notice
  • Privacy Policy