← All posts

How to Set Up Claude Code on Windows

Install Claude Code on Windows the right way. WSL vs native, the exact PATH and font fixes, and a clean copy-paste walkthrough.

To set up Claude Code on Windows as of 2026, the recommended path is to install it inside WSL2 (Ubuntu) rather than running it natively, because Claude Code was built for a Unix shell and a lot of its tooling (git, ripgrep, bash hooks) just behaves better there. Native Windows installs work, but WSL2 is the smoother, fewer-surprises route. This guide gives you both, plus the two fixes that trip almost everyone up: the PATH problem and the broken-glyph font problem.

We will keep it concrete. Copy-paste commands, exact settings, and a verdict at the end telling you which route to pick.

WSL vs Native: which install should you choose?

Here is the honest comparison. Claude Code itself runs in either, but the friction is very different.

Factor WSL2 (recommended) Native Windows
Install difficulty Medium (one-time WSL setup) Easy (npm install)
Shell behavior Full Linux, matches docs PowerShell quirks, some hooks fail
Git / ripgrep / tooling Native, fast Works, occasional path issues
File performance Fast inside ~, slow on /mnt/c Fast everywhere
MCP servers & scripts "Just works" More config, more edge cases
Best for Daily drivers, power users Quick trials, locked-down machines

If you only remember one line: develop inside the WSL filesystem (/home/you/projects), not on /mnt/c/Users/..., or you will fight slow file watching forever.

Route A: WSL2 setup (the recommended walkthrough)

This is the path we run on our own Windows machines.

  1. Install WSL2. Open PowerShell as Administrator and run wsl --install. This pulls Ubuntu by default. Reboot when prompted.
  2. Launch Ubuntu from the Start menu and create your Linux username and password.
  3. Install Node 20+. Inside Ubuntu, the cleanest way is nvm:
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
    source ~/.bashrc
    nvm install 22
    
    Avoid apt install nodejs on Ubuntu, it ships an ancient version that Claude Code will reject.
  4. Install Claude Code:
    npm install -g @anthropic-ai/claude-code
    
  5. Verify and launch:
    claude --version
    cd ~/projects/your-repo
    claude
    
  6. Authenticate. On first run it opens a browser login. If the browser does not pop, copy the printed URL into your Windows browser manually. WSL sometimes cannot launch a browser, and that is normal.

Keep your repos under ~ (the Linux home), not the Windows C: drive. Clone fresh inside WSL with git clone rather than pointing at an existing Windows folder.

Route B: Native Windows setup

If you cannot use WSL (corporate policy, no virtualization), native works too.

  1. Install Node 20+ from nodejs.org (the LTS MSI installer). Restart your terminal afterward.
  2. Install Git for Windows from git-scm.com. Claude Code shells out to git constantly, so this is not optional.
  3. Install Claude Code in PowerShell:
    npm install -g @anthropic-ai/claude-code
    
  4. Run it from inside a project folder: claude.

Native users hit two issues most often, covered next.

The two fixes everyone needs

Fix 1: The PATH problem ("claude is not recognized")

After a global npm install, Windows often cannot find the claude command. The npm global bin directory is not on your PATH. Find it with:

npm config get prefix

That prints something like C:\Users\you\AppData\Roaming\npm. Add that folder to your user PATH:

  1. Press Start, search "Edit environment variables for your account".
  2. Select Path, click Edit, then New.
  3. Paste the npm prefix path. Click OK.
  4. Close and reopen your terminal entirely. PATH changes do not apply to already-open windows.

In WSL the equivalent fix is rare with nvm, but if it happens, run source ~/.bashrc or add the nvm bin line to your ~/.bashrc.

Fix 2: The font problem (boxes, broken icons, garbled UI)

Claude Code uses Powerline-style glyphs and box-drawing characters in its interface. The default Windows console font (Consolas) does not include them, so you get tofu boxes and misaligned panels. The fix is a Nerd Font.

  1. Download a patched font like JetBrainsMono Nerd Font or CaskaydiaCove Nerd Font from nerdfonts.com.
  2. Install it (select all .ttf files, right-click, Install).
  3. In Windows Terminal, open Settings, pick your profile (or Defaults), and set the font face to the Nerd Font variant.

We go deeper on which faces render cleanest in our best Nerd Fonts roundup. And if you want the icons, ligatures, and spacing dialed in without manual tuning, that is exactly what a purpose-built terminal handles for you.

Make the terminal actually pleasant

Getting claude to run is step one. Living in it all day is step two. The stock Windows Terminal is fine, but it does not know anything about Claude Code. A terminal designed around the workflow gives you status, widgets, and a UI that does not look like 1998. See our best Windows terminal for Claude Code guide for the full shortlist, and our Claude Code terminal page for what a Claude-native setup looks like. For the broader cross-platform picture, our best AI terminal comparison lays out the options side by side.

Verdict

  • Pick WSL2 if: you write code daily on this machine, want the install to match the docs, and care about MCP servers, hooks, and speed. This is the right answer for ~90% of people.
  • Pick native Windows if: you cannot enable WSL, you are just trialing Claude Code for an afternoon, or your IT setup forbids virtualization. It works, you will just babysit PATH and fonts a bit more.

Bottom line: install WSL2, put your repos in the Linux home directory, use Node 22 via nvm, and set a Nerd Font in Windows Terminal. That combination removes about every paper cut new Windows users hit.

FAQ

Does Claude Code work natively on Windows without WSL? Yes. You install Node 20+ and run npm install -g @anthropic-ai/claude-code in PowerShell. WSL2 is recommended because the Unix shell environment matches the tooling Claude Code expects, but native is a supported path.

Why does my terminal say "claude is not recognized"? Your npm global bin folder is not on PATH. Run npm config get prefix, add that directory to your user PATH in Windows environment variables, then fully close and reopen the terminal.

Why are there boxes and broken icons in the Claude Code interface? Your terminal font lacks the special glyphs Claude Code draws with. Install a Nerd Font (JetBrainsMono Nerd Font is a safe pick) and set it as your terminal font face.

Should I keep my projects on the C: drive when using WSL? No. File access across the Windows/Linux boundary (/mnt/c) is slow and breaks file watching. Clone and keep repos inside the WSL home directory (~).


MOLTamp is a skinnable terminal built around the Claude Code workflow, fonts, widgets, status, and skins handled out of the box, so you skip the manual font and PATH tuning. Every feature works for free. A one-time $20 license just removes a single startup popup, nothing is gated behind it. If this guide saved you an afternoon, give MOLTamp a try and run Claude Code in something that was actually designed for it.