Claude Code runs natively on Windows now, but the route Anthropic still points serious developers toward is WSL2, the Windows Subsystem for Linux. The reason is simple: Claude Code expects a proper POSIX shell, and several of its safety features, including OS-level sandboxing that limits which files and network resources the tool can touch, only work on Linux and macOS. Running it inside a WSL2 Ubuntu environment gives you that Linux behaviour on your Windows machine without dual-booting or buying a second computer.
Quick Answer
Install WSL2 with one command (wsl --install) in an admin PowerShell, reboot, set up your Ubuntu username and password, then run Anthropic's native installer inside Ubuntu and authenticate with your Claude Pro or Max account. The whole process takes about 15 minutes and you do not need to install Node.js first.
Why WSL2 Instead of Native Windows
The native Windows build of Claude Code works fine for many people, so this is a choice rather than a hard requirement. WSL2 wins when your project already lives in a Linux world, when you rely on Unix tooling like git, grep and shell scripts, or when you want the sandboxing that isolates Claude Code at the OS level. That sandbox feature is currently Linux and macOS only, which is the deciding factor for anyone running the tool against sensitive code. If none of that matters to you, the native installer is perfectly valid, but WSL2 is the safer default.
Step 1: Install WSL2
Open PowerShell as Administrator (right-click the Start button, choose Terminal (Admin)) and run:
wsl --installOn Windows 11 this single command enables the required Windows features, installs the WSL2 kernel, and pulls down Ubuntu as the default distribution. Reboot when it asks. After the restart, an Ubuntu window opens and prompts you to create a Linux username and password. This account is separate from your Windows login, so pick something you will remember.
Step 2: Update Ubuntu and Confirm You Are on WSL2
Inside the Ubuntu terminal, refresh the package list and upgrade:
sudo apt update && sudo apt upgrade -yBack in PowerShell you can confirm the version with wsl -l -v. The VERSION column must read 2. If it says 1, run wsl --set-version Ubuntu 2 to convert it. Version 2 is what gives you the real Linux kernel and the file-system performance Claude Code expects.
Step 3: Install Claude Code
Anthropic's native installer is now the recommended method, and the older global npm install is deprecated. Inside Ubuntu, run the official install script from the Claude Code documentation, then close and reopen the terminal so the claude command is on your path. You do not need to pre-install Node.js for the native installer to work, which removes a common point of failure that tripped up earlier setups.
Step 4: Authenticate and Open Your Project
Run claude in any directory and it will walk you through signing in with your Claude Pro or Max subscription through your browser. A machine with enough RAM and a fast NVMe drive makes a real difference once you are running agentic tasks across a large repository, which is why the AI-focused PC range at Evetech is worth a look if your current machine struggles. Keep your code on the Linux side of the file system (under your Ubuntu home directory) rather than reaching across to the Windows C: drive, because cross-boundary file access is noticeably slower.
Step 5: A Few Sanity Checks
If claude is not found after install, reopen the terminal or run source ~/.bashrc. If authentication stalls, make sure your Windows firewall is not blocking the browser callback. And if performance feels sluggish, double-check you are working inside the WSL file system, not on a mounted Windows path. For developers shopping for a capable workstation to run all this on, a quick scan of what is selling well in desktops right now gives a feel for current value before you commit.
Frequently Asked Questions
Do I need WSL2 to run Claude Code on Windows?
No. Claude Code has a native Windows build, but Anthropic recommends WSL2 because it provides a true POSIX shell and supports OS-level sandboxing, which the native Windows version does not. WSL2 is the safer choice for sensitive projects.
Do I have to install Node.js before Claude Code?
Not with the native installer, which bundles what it needs. The older npm-based global install required Node.js but is now deprecated, so the native installer is the cleaner path.
Why should I keep my code inside the WSL file system?
WSL2 reads and writes its own Linux file system far faster than it accesses mounted Windows drives. Working from your Ubuntu home directory rather than the Windows C: drive gives noticeably better performance for large projects.
Can I use my Claude Pro subscription with Claude Code in WSL?
Yes. Running claude triggers a browser-based sign-in that works with both Claude Pro and Max accounts. You authenticate once and the session is remembered.
What if the claude command is not found after installation?
Close and reopen your Ubuntu terminal, or run source ~/.bashrc, so the shell picks up the updated path. This is the most common post-install hiccup and it resolves in seconds.
A smooth Claude Code workflow lives or dies on having a fast, well-specced machine underneath it. Explore the AI PCs built for demanding developer workloads at Evetech and get a setup that keeps up with agentic coding.