How to Install Claude Code on Windows (Step-by-Step Guide)
To install Claude Code on Windows, open PowerShell and run irm https://claude.ai/install.ps1 | iex, then open a new terminal window and run claude –version to confirm it worked. Anthropic now ships a native Windows installer, so you do not need WSL or Node.js, and you do not need administrator rights.
Claude Code is Anthropic’s coding agent that runs in a terminal. You point it at a project folder, describe what you want in plain language, and it reads your files, makes the change, and shows you what it did. Two facts matter before you install. First, it needs a paid Claude plan: the free plan does not include Claude Code access. Second, older guides say WSL2 is mandatory on Windows. That used to be true, and it is now wrong. This guide starts with that choice, then covers the install, the errors almost everyone hits, and your first session.
Before you start: what you need
Check these four things first. They take two minutes and prevent most failed installs.
- A paid Claude plan. Claude Code needs a Pro, Max, Ultra, Team, or Enterprise subscription, or a Claude Console account with API credits. The free claude.ai plan does not include Claude Code access, so you will be stopped at sign in. On a work machine, ask whether your organisation already has a Team or Enterprise plan.
- Windows 10 version 1809 or later, or Windows Server 2019 or later. Windows 11 is covered. Anthropic also lists 4 GB of RAM or more, an x64 or ARM64 processor, and internet access.
- A terminal you can open. PowerShell is the default choice and the one this guide uses first. Command Prompt works too, with its own command. No administrator rights are needed: the installer writes into your own user folder.
- Git for Windows, optional but worth installing. With it, Claude Code gets a Bash tool for shell commands, which handles most development work more smoothly than PowerShell. Without it, Claude Code uses its PowerShell tool instead.
One more check decides your route: where do your projects live? If your code is in normal Windows folders, install natively. If it lives inside a WSL Linux distribution, install inside WSL instead.
Native Windows or WSL: pick first
Anthropic’s setup documentation lists three Windows options: native Windows, WSL 2, and WSL 1. The difference that matters is sandboxing, which lets Claude Code run commands in an isolated environment. Native Windows does not support it, WSL 2 does, and WSL 1 does not.

| Option | What it needs | Sandboxing | Pick it when |
|---|---|---|---|
| Native Windows | Nothing extra | Not supported | Your projects are Windows native |
| WSL 2 | WSL 2 enabled | Supported | Linux projects, or sandboxed commands |
| WSL 1 | WSL 1 enabled | Not supported | WSL 2 unavailable |
For most Windows users, native is the right answer. It is the route Anthropic marks as recommended, it needs nothing installed first, and it puts the claude command in every terminal on your PC. The sandboxing gap sounds worse than it is: Claude Code still asks before it runs commands that change things. If you work with Linux toolchains, or you want the strongest isolation for the commands Claude Code runs, install inside WSL 2 instead and run claude from inside the WSL terminal.
If you chose WSL 2, open your WSL distribution and run curl -fsSL https://claude.ai/install.sh | bash there, then skip to the check section.
Install Claude Code in PowerShell
This is the recommended method. It takes about a minute, and it shows no progress bar while it downloads.
- Open PowerShell: press Win plus X, then select Terminal or Windows PowerShell. Check the prompt first: it should start with PS, as in PS C:\Users\YourName. The command below only works in PowerShell.
- Open the 64 bit PowerShell, not the x86 entry: Claude Code does not support 32 bit Windows.
- Paste this command and press Enter: irm https://claude.ai/install.ps1 | iex
- Wait. The installer prints nothing while it downloads, so give it a full minute.
- When the installer finishes, close the terminal window and open a new one: an open window does not pick up the new install location.
- In the new window, run claude –version. A working install prints a version number followed by (Claude Code).
If the command prints an error instead of installing, do not try the other shell’s command as a guess. Read the error first: it tells you exactly which shell you are actually in. The next section covers the Command Prompt route and the errors that come from mixing the two commands up.
Install Claude Code in Command Prompt
Use this route only if you work in Command Prompt rather than PowerShell. The program you get is identical, but the install command is different, because CMD does not understand PowerShell’s irm and iex commands.
- Open Command Prompt. Press Win plus R, type cmd, and press Enter. Check the prompt: it should read C:\Users\YourName without any PS at the start.
- Paste this command and press Enter: curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
- Wait while it downloads, then close the window and open a new one.
- In the new window, run claude –version and look for a version number followed by (Claude Code).
The two errors below are the most common Windows install failures, and both mean the same thing: the command went into the wrong shell. Anthropic documents both on its setup page.
- If you see ‘irm’ is not recognized as an internal or external command, you pasted the PowerShell command into Command Prompt. Switch to PowerShell, or stay in CMD and run the curl command above.
- If you see The token ‘&&’ is not a valid statement separator, you pasted the CMD command into PowerShell. The && separators are CMD syntax, and PowerShell rejects them. Switch to Command Prompt and run the curl command there, or stay in PowerShell and run irm.
- Two more errors point the same way. If PowerShell says ‘bash’ is not recognized as the name of a cmdlet, you pasted the Linux curl command into a Windows shell. If it says A parameter cannot be found that matches parameter name ‘fsSL’, PowerShell has treated curl as its own Invoke-WebRequest alias. Use the Windows command for your shell, and use curl.exe if you need the real curl program.
A different failure looks like the installer printing web page text, or a ParserError quoting HTML tags and CSS. That means the download returned a web page instead of the install script, usually because of a proxy, a network filter, or a temporary service problem. Wait a few minutes and retry the original command first. If it keeps failing, check whether your network can reach downloads.claude.ai. WinGet is a useful fallback, because it downloads from a different source.
Check the install worked
Two commands confirm the install is healthy. Run them in a fresh terminal window, before you start a session.
- Run claude –version. You should see a version number followed by (Claude Code). If the shell says claude is not recognized, the program installed but Windows cannot find it yet: that is the PATH problem, and the next section fixes it.
- Run claude doctor. This prints read only diagnostics about your installation and settings, including install health and any warnings with suggested fixes. It does not start a session. If it reports a failed update attempt, run claude update from your shell.
If claude –version prints a version but claude crashes or hangs, run Get-Command claude | Select-Object Source in PowerShell to see which copy your shell is finding. If it points somewhere unexpected, you have two installs: remove the extra one.
Fix claude is not recognized: the PATH fix
This is the error most Windows users hit, and it is not a failed install. The installer places claude.exe at %USERPROFILE%\.local\bin\claude.exe, a folder inside your own user profile, such as C:\Users\YourName\.local\bin. Windows finds programs by searching the folders listed in PATH, so if that folder is not in your PATH, Windows cannot find claude even though the file is on your disk. The installer prints a note under Setup notes saying the folder is not in your PATH, with the fix, but it does not change PATH itself.

First, confirm the file is actually there. In PowerShell, run Test-Path “$env:USERPROFILE\.local\bin\claude.exe”. If it prints True, the program is there and only the PATH is missing. If it prints False, there is no native install at all: run the installer again. In Command Prompt, the same check is dir “%USERPROFILE%\.local\bin\claude.exe”.
- In PowerShell, run these two commands, one at a time: $currentPath = [Environment]::GetEnvironmentVariable(‘PATH’, ‘User’) and then [Environment]::SetEnvironmentVariable(‘PATH’, “$currentPath;$env:USERPROFILE\.local\bin”, ‘User’). The first reads your current user PATH, and the second writes it back with the Claude Code folder added. This changes your user PATH, not the system PATH, so it needs no administrator rights.
- Close the terminal window completely and open a new one. PATH changes do not reach windows that are already open, and this is the step people skip. A terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.
- In the new window, run claude –version. A version number means the fix worked.
If you prefer the graphical route, open System Settings, go to Environment Variables, and add %USERPROFILE%\.local\bin to your User PATH variable, then restart your terminal. If claude is still not found, check that the change was saved by running [Environment]::GetEnvironmentVariable(‘PATH’, ‘User’) in PowerShell and looking for .local\bin in what it prints.
Sign in and start your first session
Installing is only half the job. Claude Code works through your Claude account, so the first run signs you in, and the first session in a project sets up the file that tells Claude Code how your project works.
- Open a terminal in your project folder. In PowerShell, use cd to move there, for example cd C:\Projects\my-first-project. The same cd command works in Command Prompt. If you do not have a project yet, make an empty folder first.
- Run claude and press Enter. Claude Code prompts you to log in on first use: follow the prompts to complete authentication in your browser. If you set the ANTHROPIC_API_KEY environment variable and approve the key when asked, Claude Code skips the login prompt. Your login is stored, so you sign in once.
- When the prompt appears, it shows the version, the current model, and the working directory. Type /help to see the available commands, or /resume to continue a previous conversation. To sign in again later, type /login inside a session.
- Run /init. Anthropic recommends this for a first session in a repository: it scans your project and generates a starter CLAUDE.md file. CLAUDE.md is a plain Markdown file in your project root that Claude Code reads at the start of every session, recording your tech stack, build and test commands, and code conventions. Read what /init produced, add the rules it could not infer, and commit the file. If a CLAUDE.md already exists, /init updates it instead of creating a duplicate.
- Ask your first question in plain language, such as what does this project do, or give it a small task, such as add input validation to the user registration form. Claude Code reads your project files as needed, so you do not have to paste context in yourself. When it proposes a change, it shows you the change first: read it, then select Yes to approve it.
Two things are worth knowing in advance. First, Claude Code sends your code to Anthropic’s servers to do its work. If the model needs to run entirely on your own machine instead, that is a different setup: see our guide to running local AI models on your PC with Ollama, which covers the simplest way to do it, and our guide to running AI models offline with LM Studio, which covers the graphical route. Second, if sign in fails with an OAuth error, a 403, or a message saying Claude Code access has not been granted for this account, the problem is the account, not the install: a free plan cannot sign in. See Anthropic: Troubleshoot installation and login for the exact fixes.
Other ways to install: WinGet and npm
The native installer is the recommended method, but two other methods install the same program, and each suits a different setup. The one real difference is updates: native installs update themselves in the background, while WinGet and npm installs do not, so you have to update them yourself.
| Method | Command | Updates | Best for |
|---|---|---|---|
| Native installer | irm https://claude.ai/install.ps1 | iex | Automatic, in the background | Most Windows users |
| WinGet | winget install Anthropic.ClaudeCode | Manual | WinGet users |
| npm | npm install -g @anthropic-ai/claude-code@latest | Manual | Node.js 22 or later users |

WinGet is the simplest alternative: in PowerShell, run winget install Anthropic.ClaudeCode, then update it yourself with winget upgrade Anthropic.ClaudeCode. One quirk: the upgrade can fail while Claude Code is running, because Windows locks the executable. Close Claude Code and run it again. The npm route needs Node.js 22 or later: npm install -g @anthropic-ai/claude-code@latest. Anthropic says not to use sudo, and not to upgrade with npm update -g, because it may not move you to the newest release. If you later see an error saying claude native binary not installed, the npm install did not finish: complete it first.
Whichever method you pick, keep only one. Do not install with WinGet as well as the native installer, and do not add an npm global install on top. Multiple installs cause version mismatches, and the native install is the one to keep. To remove an npm global install, run npm uninstall -g @anthropic-ai/claude-code. To remove a WinGet install, run winget uninstall Anthropic.ClaudeCode. To remove a native install, delete %USERPROFILE%\.local\bin\claude.exe and %USERPROFILE%\.local\share\claude. See Anthropic: Claude Code setup for the full installation options and the release channel settings.
Keep Claude Code updated and remove it cleanly
A native install checks for updates on startup and periodically while it is running. Updates download and install in the background and take effect the next time you start Claude Code. Anthropic’s setup page documents a release channel setting for immediate or delayed stable updates, and a way to disable auto updates entirely. Run claude doctor to see the result of the last update attempt. If it reports a failed attempt, run claude update from your shell.
WinGet and npm installs need you to act. For WinGet, run winget upgrade Anthropic.ClaudeCode periodically. For npm, reinstall the package rather than running npm update -g.
To uninstall, reverse the method you used. For a native install, close Claude Code, delete %USERPROFILE%\.local\bin\claude.exe, and delete the %USERPROFILE%\.local\share\claude folder, which holds the downloaded versions. Your settings live under .claude in your user profile, so leave that folder alone if you plan to reinstall. If you want a full clean slate, remove it too, but know that it also holds your global CLAUDE.md memory and your login, so you will sign in again.
If the install fails
Most install failures on Windows fall into a small set of causes, each with a distinct error message. Match the message you see to the fix, rather than reinstalling blindly.
- claude is not recognized after a successful install: the PATH fix above. Check Test-Path first, then add the folder to your User PATH and open a new terminal.
- claude is not recognized right after an update: Claude Code renames claude.exe during an update, and the new file sometimes does not land. Anthropic documents a recovery command that restores the newest claude.exe.old backup.
- The process cannot access the file because it is being used by another process: the installer could not write to %USERPROFILE%\.claude\downloads. A previous install attempt is usually still running, or antivirus software is scanning a partly downloaded file there. Close any running installer and delete that downloads folder, then run the installer again.
- Claude Code on Windows requires either Git for Windows (for bash) or PowerShell: it found neither to work with. Install Git for Windows, or run the install from PowerShell.
- App unavailable in region: Claude Code is not available in your country. Anthropic publishes a supported countries list.
- Failed to fetch version, or the install cannot reach the download server: check your network and proxy settings. Behind a corporate proxy, set HTTP_PROXY and HTTPS_PROXY before installing.
- Install script returns HTML, or a 403, or a syntax error near unexpected token: the download returned a web page instead of the script. Retry after a few minutes, then fall back to WinGet.
The install itself is the easy part. The real change is that WSL is no longer the price of admission: one PowerShell command puts Claude Code on Windows, and the two errors that stop most people are a command pasted into the wrong shell and a PATH entry that was never added. Get those two right, sign in with a paid plan, run /init, and you are working.
- How to Install Claude Code on Windows (Step-by-Step Guide) - December 5, 2026
- How to Check Mac Battery Cycle Count and Health on MacBook (Explained) - December 4, 2026
- How to Uninstall Apps on a Mac Completely (Step-by-Step Guide) - December 3, 2026
