Install Git for Windows
Download the installer from git-scm.com and run it. Click Next on each screen to keep the defaults. If it asks about an editor, keep the default. On "Adjusting your PATH environment", keep the recommended option.
The lessons use Git from lesson 3 on, and Claude Code uses the Git Bash that comes with it to run commands. Without it, Claude Code falls back to PowerShell.
Open PowerShell
Press Win + X and choose Windows PowerShell or Terminal.
Each line should start with PS C:\Users\ and your name. If there's no PS, you're in CMD, which needs the other install command below.
Install Claude Code
Windows PowerShellirm https://claude.ai/install.ps1 | iexWindows CMD, only if you're not in PowerShellcurl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdWhen it's done you'll see Claude Code successfully installed! This version updates itself in the background.
Mixed them up?
The token '&&' is not a valid statement separatormeans you pasted the CMD line into PowerShell.'irm' is not recognizedmeans you pasted the PowerShell line into CMD.Check Claude Code
Close PowerShell, open a new window, and run:
Windows PowerShellclaude --versionA version number followed by (Claude Code). If PowerShell says
'claude' is not recognized, see the troubleshooting page.Install the GitHub CLI
Windows PowerShellwinget install --id GitHub.cli --source wingetThe installer changes your PATH, so open a new window (a new tab isn't enough in Windows Terminal) and check:
Windows PowerShellgh --version git --versionBoth print a version number.
Sign in and make an account
Run
claudeonce to sign in (Claude Code guide), and make a free GitHub account and connect it (Git and GitHub).
Commands that differ on Windows
Most commands in the lessons work the same in PowerShell: cd, mkdir, git, gh and claude. Where a lesson shows a different line for Windows, use that one. To open a file in your browser, use start index.html.
Other ways to install
You can also install Claude Code with winget install Anthropic.ClaudeCode. That version doesn't update itself; run winget upgrade Anthropic.ClaudeCode now and then. If you'd rather work in Linux, Claude Code also runs inside WSL: open your WSL distribution and follow the Linux guide there. The Advanced setup page compares the two.
You're set up when
claude --version,git --versionandgh --versioneach print a version number in a new PowerShell window.- Running
claudeopens a session without asking you to log in again.
Sources
Read on October 4, 2026.
- Claude Code, Advanced setup: system requirements, native Windows and WSL, no Administrator needed, Git Bash and the PowerShell fallback, WinGet and updates.
- Claude Code, Terminal guide for new users: the Git for Windows screens, opening PowerShell, PowerShell versus CMD.
- Claude Code, Quickstart: the CMD install line and the two mix-up errors.
- Git, Install for Windows.
- Installing gh on Windows: the WinGet command and the new-window note.