Installing Claude Code on Windows: One PowerShell Line Is All It Takes
claude-code

Installing Claude Code on Windows: One PowerShell Line Is All It Takes

· 13 min read · Habni

Search "install Claude Code" and you get a mix of answers. One post tells you to use npm, another says install WSL first, a third points you to the official script. Here is the short version for Windows: one line in PowerShell is all it takes.

irm https://claude.ai/install.ps1 | iex

But before you type that command, there is one thing worth confirming. Claude Code is not available on the free plan. The install itself will go through, but you will get stuck at sign-in. Let's cover that first, then move on to installing.

If you have never opened a terminal before, that's fine. This guide is built to be followed step by step: opening PowerShell, running the install command, confirming it worked, signing in, and giving Claude its first task. Each step tells you what success looks like, so you can compare it against your own screen as you go. Install commands can go stale quickly, so if you get stuck, check the official docs as a second reference.

Claude Code

Claude Code is Anthropic's AI tool that takes instructions in plain language from your terminal. It reads, organizes, and edits files directly on your computer.

Pricing: the free plan will not work, you need Pro or higher

Let's get this out of the way first, since it trips up a lot of people.

The official documentation is explicit: Claude Code requires a Pro, Max, Team, Enterprise, or Console account, and the free Claude.ai plan does not include access. That is a different arrangement from the free chat you might already use in your browser at claude.ai.

Here is the part that confuses people. The install itself works fine on a free account. The command runs, and claude --version reports a version number just like it should.

The wall shows up one step later, when you try to sign in and actually hand it work. So a successful install does not mean you are ready to use it.

The same category of tool, Codex CLI, also is not available on the free plan. It shows up in OpenAI's pricing table starting from the Plus plan.

Both tools share the same $20 a month entry point. If you would rather get a feel for a terminal AI agent before spending anything, Antigravity CLI offers free usage and has a lower barrier to entry.

What you need: a paid subscription and Windows 10 1809 or later

Three things to check before you start. If any one of them is off, the install will not go through.

RequirementHow to check
A paid Claude subscriptionPro, Max, Team, Enterprise, or Console all work. If you're on your own, Pro is the usual starting point
Windows 10 1809 or later, or Windows Server 2019 or laterOpen Settings, then System, then About
4GB of memory or moreNot something you need to worry about on a recent PC

There is one more condition tucked into the second requirement. Your Windows must be 64-bit. The install script rejects 32-bit outright. Most PCs sold in the last several years are 64-bit, but if you're on an older office machine, check "System type" on that same About screen first.

You do not need administrator rights. Claude Code installs inside your own user folder, so it usually installs fine even on a locked-down work PC without admin access.

If your company's security policy has you worried, here's one thing you can cross off the list. The official docs note that the irm | iex pattern used in this guide is not subject to PowerShell's execution policy restriction. Execution policy applies to saved .ps1 files, and this command never saves one. It runs the downloaded content directly instead.

If you're on a Mac, the install command is different. That's covered in a separate Mac guide.

Step 1: open PowerShell

On Windows 11, right-click the Start button and choose "Terminal."

On Windows 10, type PowerShell into the Start menu search box and launch "Windows PowerShell." It's normal that "Terminal" does not show up in the right-click menu on Windows 10, that's expected, not a bug.

Success looks like this: a black (or blue) window opens, and the prompt starts with PS, something like PS C:\Users\yourname>. This window is your workspace for the rest of this guide.

That PS is worth double-checking before you move on. Windows has two similar-looking black windows: PowerShell and Command Prompt (CMD).

The two understand different commands. If the prompt starts with PS, you're in PowerShell. If it starts with C:\Users\yourname> and no PS, you're in Command Prompt. This guide assumes PowerShell throughout.

Opening the wrong one will throw an error at the next step. If that happens, the "If you get stuck" section near the end walks you through reading that error.

Step 2: run the install command

Copy the line below exactly, paste it into the PowerShell window, and hit Enter.

irm https://claude.ai/install.ps1 | iex

Short as it looks, that line does two things. irm downloads Anthropic's official install script. Then iex runs it.

The script works through a sequence. First it confirms your PC is 64-bit. Then it fetches the latest version info and downloads the matching file.

Finally, it checks the downloaded file against a checksum to confirm it's genuinely what Anthropic published. Only after that check passes does it move on to installing, the same idea as matching a tracking number against a package before you open it.

Once the install finishes, the script also registers the program's location (adds it to PATH) so that typing claude works from any window going forward. The program itself lives in .local\share\claude inside your user folder, with the executable at .local\bin\claude.exe.

Success looks like this: a line reading Setting up Claude Code... scrolls by, followed by:

✅ Installation complete!

There's no progress bar, so it's normal for the screen to go quiet for a moment. No icon appears on the desktop or in the Start menu either, and that's expected. It's a terminal-only tool, so there never was one to begin with.

If it stays quiet for a long stretch, antivirus software can be the reason. Windows Defender's real-time scanning has been reported to slow a download to as little as 0.3 megabytes per second. At that rate, a 300MB download can take over ten minutes.

Treat up to 10 minutes as normal and wait it out. If the window is just quiet with no error text, don't close it. If you do see an error, jump to the "If you get stuck" section below.

Step 3: confirm the install in a new window

Close the PowerShell window you have open entirely, then open a fresh one the same way as Step 1. The registration you just set up only takes effect in windows opened after the install. In the new window, type:

claude --version

Success looks like this:

2.1.238 (Claude Code)

The version number will differ depending on when you install. That's fine, as long as you see Claude Code in parentheses, the install worked.

Since we're on the subject of versions: you don't need to manage updates yourself. Installing through the official script means Claude Code quietly updates itself in the background.

Step 4: sign in with your Claude account

In the same window, type just this:

claude

Your browser opens automatically. Sign in with your usual Claude account, and the flow hands control back to PowerShell. You only need to sign in once. After that, the session is remembered on your machine.

This is the fork in the road mentioned earlier. If you sign in with a free account, this is where it stops working. If you don't have a subscription, go to claude.ai, upgrade to Pro or higher, and try again.

Success looks like this: a prompt line appears inside the PowerShell window, and the cursor blinks next to it.

>

The window has switched from a place where you type commands to a place where you can talk to it.

Step 5: give it one task

Type plain language into the prompt, not code. Try something like:

List the files in this folder for me

"This folder" means wherever the current window is pointed. If you opened PowerShell straight from the Start menu, that's your user folder (C:\Users\yourname). If you want to work somewhere else, exit Claude and run cd path\to\folder first, then start it again.

Success looks like this: a list of file names appears, followed by a short description of what each one is. If you got that far, you're done for today.

If you want to build up your terminal fundamentals from the ground up, the AI CLI track covers it across six lessons.

If you get stuck: fixes by error message

Find the line that matches what's on your screen and read just that entry.

'irm' is not recognized as an internal or external command. You opened the wrong window. That's Command Prompt (CMD), not PowerShell. Go back to Step 1 and open a window whose prompt starts with PS.

If you specifically want to install from Command Prompt, the command is different:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

The token '&&' is not a valid statement separator. The opposite problem: you typed the Command Prompt command into PowerShell. Switch to the irm one-liner above.

You typed claude and got "command not found." Almost always a window issue. Registration only takes effect in windows opened after the install, so the window you used during install won't recognize it. Close PowerShell completely and open a new one to try again.

During install you see The process cannot access the file. Either a previous install attempt didn't finish cleanly, or antivirus is scanning the download folder right now.

Close every open PowerShell window and wait for the antivirus scan to finish. Then delete the %USERPROFILE%\.claude\downloads folder and run the install command again.

Install is rejected because you're on 32-bit. Claude Code only supports 64-bit Windows. Check "System type" under Settings, System, About.

If System type reports 64-bit and you're still hitting this error, you opened Windows PowerShell (x86) by mistake. Windows lists Windows PowerShell and Windows PowerShell (x86) as separate Start menu entries. The (x86) one runs as 32-bit even on a 64-bit PC. Open the one without (x86) and try again.

Sign-in fails or your account gets rejected. Most likely a free plan. Claude Code requires a Pro subscription or higher.

Not sure what's wrong? Run claude doctor to check your install status. It doesn't start a session, just prints a diagnostic, so it's safe to run any time. It reports your install method, version, auto-update status, and if there's a problem, what's causing it and how to fix it.

In 30 seconds
  • Claude Code doesn't work on the free plan. You need Pro, Max, Team, Enterprise, or Console. The install itself succeeds, but sign-in is where it stops.
  • Installing on Windows takes one line in PowerShell: irm https://claude.ai/install.ps1 | iex. No admin rights needed.
  • Check your window first. If the prompt starts with PS, you're in PowerShell. If not, you're in Command Prompt. The two take different commands.
  • Five steps: open PowerShell, run the install command, confirm with claude --version in a new window, run claude and sign in, then give it a first task.
  • You need Windows 10 1809 or later, 64-bit, and at least 4GB of memory. 32-bit is not supported.
  • Installing through the official script means updates happen automatically in the background.

Frequently asked questions

Can I use a desktop app instead of the terminal?

Yes. There's a separate desktop app that doesn't require opening a terminal at all, and installing plus signing in gets you most conversational work through that. This guide focuses on the CLI because of automation. Running a fixed set of commands repeatedly, or chaining it into other programs, only works through the terminal version.

Can I use Claude Code for free?

No. According to the official documentation, Claude Code requires a Pro, Max, Team, Enterprise, or Console account, and it is not included with the free Claude.ai plan. The install itself works on a free account, but you'll be blocked at sign-in. Codex CLI, a comparable tool, is also only listed from the Plus plan in the official pricing table. Both land at $20 a month as their entry point.

Should I open PowerShell or Command Prompt?

Both can install Claude Code, but the commands differ. If the prompt starts with PS, you're in PowerShell, and you use irm https://claude.ai/install.ps1 | iex. If it starts with C:\Users and no PS, you're in Command Prompt, which uses a separate curl-based command. This guide is written for PowerShell.

Do I need to install WSL first?

No. You can install and use it directly on Windows. WSL is worth choosing if you want to run Linux-only tools alongside it or need sandboxed execution, but it isn't necessary for getting started. If you have Git for Windows installed, it changes how Claude Code handles shell commands slightly, and that's also optional.

I don't have admin rights on my work PC. Can I still install it?

Usually, yes. Claude Code installs inside your own user folder, so admin rights aren't required. The official docs confirm you don't need to run it as administrator. That said, if your company's security policy blocks script execution or outside downloads outright, that's a separate issue you'd need to raise with IT.

How do I update Claude Code?

If you installed via the official script, there's nothing to do. It updates automatically in the background. To update immediately, run claude update. If you installed via WinGet or npm, auto-update doesn't apply, so run winget upgrade Anthropic.ClaudeCode or npm install -g @anthropic-ai/claude-code@latest yourself.

How do I install Claude Code on a Mac?

On a Mac, run curl -fsSL https://claude.ai/install.sh | bash from the terminal. You need macOS 13 or later. Since the commands differ from Windows, Mac users should follow a Mac-specific guide.

Sources (7)Expand to see all sources
#install Claude Code windows#Claude Code windows install#Claude Code setup#Claude Code installation#claude code powershell#Claude Code#PowerShell

Related Posts