How to Set Up Claude Code on Windows and WSL
Last updated: July 2026
In this guide you will set up Claude Code on a Windows machine the way it actually wants to run, inside WSL, the Windows Subsystem for Linux. By the end you will have Claude Code installed, authenticated, and running its first task in a real project. I am including the one error that stops most Windows beginners in their first ten minutes, so it lands as a speed bump instead of a wall.
What you need before starting
- Windows 10 or 11, with permission to install software
- A paid Claude plan
- About 45 minutes
- No prior Linux or terminal experience required
Step 1: Install WSL
Claude Code runs best in a Linux environment, and Windows ships one. Open PowerShell as Administrator and run:
wsl --install
This installs WSL with Ubuntu and will ask you to restart. After the restart, Ubuntu opens and asks you to create a username and password. Write them down.
Checkpoint: A terminal opens with a prompt ending in $, and you are inside Ubuntu, not PowerShell.
Step 2: Install Node inside WSL
Claude Code needs Node.js. Install it inside WSL using nvm, which avoids version headaches later:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Close and reopen the Ubuntu terminal, then install the current Node:
nvm install --lts
Checkpoint: Running node --version prints a version number rather than an error.
Step 3: Install Claude Code
Now install Claude Code itself:
npm install -g @anthropic-ai/claude-code
Then start it and follow the prompts to sign in with your Claude account:
claude
Checkpoint: Claude Code launches and walks you through signing in.
Step 4: Open it in a real project
Make a folder for a project, move into it, and start Claude Code there so it has somewhere to work:
mkdir ~/first-project
cd ~/first-project
claude
Working inside your Linux home folder (the ~) matters for speed, which is the gotcha in the next section.
Checkpoint: Claude Code is running and reports that it is working inside first-project.
Step 5: Give it context with a CLAUDE.md
Before you ask for anything, tell Claude what this project is. Create a short CLAUDE.md, the file Claude reads at the start of every session. If this is new to you, here is what a CLAUDE.md file is:
# Project
A scratch project for learning Claude Code.
# Rules
Explain each step in plain language before running it.
Checkpoint: A CLAUDE.md file exists in the folder, and Claude acknowledges it.
Step 6: Run your first task
Ask for something small and real:
Create a Python script called hello.py that prints today's date in a
friendly sentence, then run it and show me the output.
Checkpoint: Claude writes the file, runs it, and you see a dated sentence printed back.
Where this breaks
"command not found" after installing. This is the one that stops people. It almost always means the terminal has not picked up the new install yet. Close the terminal completely and open a fresh one, and it resolves. This is normal, it is not you, and it happens to experienced developers too.
You work in the wrong folder and everything is slow. WSL is fast inside its own Linux home (~) and slow when reaching across into Windows files (the /mnt/c path). Keep your projects in the Linux home folder and your machine will feel quicker.
Node version errors. If a command complains about Node, run nvm install --lts again and reopen the terminal. nvm exists precisely to make this a one-line fix.
The sign-in does not complete. If authentication stalls, quit Claude Code, reopen it, and run the sign-in again. A fresh start clears most auth hiccups.
What to build next
With Claude Code running, the natural first real project is something you will actually keep. Building a portfolio website is a great one, since it ends with a live URL you can show people. From there, the Claude Code tutorial goes deeper on the capable builds.
If you want someone on the call the first time an error appears, so it lands as routine instead of a roadblock, that is exactly what my sessions are. Book a free Discovery Call and we will get you set up and building in the first hour.
These tutorials come from the actual curriculum I teach 1-on-1. Every step here I have run myself before publishing it.
Related articles
Keep reading on related topics.
Enjoyed this article?
You can master this and more with a dedicated 1-on-1 tutor.
Book a Free Discovery Call