Skip to content
Zumkai

How to install Claude Code (Windows, Mac, Linux): login, pricing, and the free-plan trap

Step by step for installing Claude Code on Windows, Mac, and Linux, signing in with the right account, understanding pricing, and confirming with claude doctor.

  • how to install claude code
  • install claude code windows
Dark cover with the title Install Claude Code and three blocks showing Windows with irm, Mac with curl and brew, and login with Pro and Max.
Contents
  1. What to check before installing
  2. Which command fits your system
  3. How to install on Windows without tripping on the terminal
  4. How to install on Mac and Linux
  5. How to sign in and make sense of pricing
  6. How to confirm it worked and open it in the right place
  7. Frequently asked questions
  8. Conclusion
  9. Sources

Installing Claude Code stays easy when you run one command at a time, in the right terminal. Plenty of people mix two methods in one afternoon and end up unsure which one worked. This guide takes the other road, calm and in order.

You will see what to check before starting, which command matches your system, how to sign in with the right account, and how to confirm everything is ready. If the overview map sent you here, return to it anytime at Claude Code from zero. The commands, memory requirements, login options, and diagnostics are in the official quickstart guide.

What to check before installing

Check memory first, because it sets how pleasant the tool feels. Minimum 4GB of RAM, recommended 8GB, per the official quickstart guide. On a machine sitting exactly at the minimum, close heavy apps during the install to avoid slowness.

Check Node only if you plan to install through npm. The rule is Node 22 or newer, also in the official quickstart guide. Run the command below to see the current version before picking a method.

bash
node --version

On Windows, check the terminal and Git before running anything. Native Windows wants Git for Windows installed plus PowerShell for the main method, with details in the official quickstart guide. On Mac and Linux the stock terminal does the job, with WSL covering Linux inside Windows.

Which command fits your system

Pick one method and stay with it to the end. Mixing curl with npm or winget with npm in one attempt creates two failure points and muddies the diagnosis. Every path below is listed in the official quickstart guide.

SystemCommandNote
macOS, Linux, or WSLcurl -fsSL https://claude.ai/install.sh | bashNative Unix-terminal path, run once, then open a new terminal
Windows in PowerShellirm https://claude.ai/install.ps1 | iexRun in PowerShell, not in CMD
macOS with Homebrewbrew install --cask claude-codeFor existing brew users, upgrades are manual
Windows with wingetwinget install Anthropic.ClaudeCodeFor existing winget users, upgrades are manual
Any system with Node 22 or newernpm install -g @anthropic-ai/claude-codeRequires node --version at 22 or higher first

That table compresses the decision into one read. On Windows, start with irm or winget. On Mac, start with curl or brew. On Linux or WSL, use curl. Keep npm as plan B for when you already maintain Node.

Most install failures are mixing failures, not command failures. One channel per attempt plus the right plan before blaming the terminal fixes nearly everything. The rest is opening a fresh terminal.

The 5 ways to install Claude Code Donut chart with 5 paths in equal slices: curl, irm, brew cask, winget, and npm. Each slice is one install channel. Equal slices for illustration, no relation to market share. Source: official quickstart guide. 5 paths, 1 choice at a time Pick your system's channel 5 channels 1 curl 2 irm 3 brew 4 winget 5 npm with Node 22 Source: official quickstart guide. Equal slices for illustration.
Pick one channel and stay with it through confirmation before trying another. Source: official quickstart guide.

How to install on Windows without tripping on the terminal

Screen with code during a Windows install through PowerShell
Photo: Negative Space via StockSnap (CC0).

Use PowerShell for the main Windows method. The official command pipes irm into iex, and that flow belongs to PowerShell, per the official quickstart guide. Open PowerShell, paste one command, and wait for it to finish before closing the window.

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

Run irm in PowerShell step by step

Open Start, type PowerShell, and open Windows PowerShell. Paste the irm command exactly as shown above and press Enter. Wait for the progress bar to finish, then open a new terminal before testing, because the system path only refreshes in the new session.

The CMD-versus-PowerShell gotcha

CMD and PowerShell look alike and run different commands. The irm pipe into iex does not work in CMD, so pasting it there errors out immediately. The fix is simple. Close CMD, open PowerShell, and run again through one channel.

The other common trap is the execution policy blocking scripts in PowerShell. On a blocked-script warning, open a normal PowerShell, confirm you copied the full command, and retry before changing settings. Note the exact error message, because it tells whether the problem is the command, the network, or permissions.

Install Git for Windows and commit to one channel

Install Git for Windows on native Windows, because it guarantees Git plus a more predictable place to open projects. Verify with the command below in a fresh terminal after installing.

ps
git --version

Use winget as the tidy alternative if you already install software through it. Install and upgrade look like this, with the full channel list in the official quickstart guide.

ps
winget install Anthropic.ClaudeCode
winget upgrade Anthropic.ClaudeCode

How to install on Mac and Linux

Laptop on a desk during a curl install on Mac and Linux
Photo: Negative Space via StockSnap (CC0).

Use curl as the default path on Mac, Linux, and WSL. It downloads the official script and runs it straight through, with no Node or extra manager involved. The exact command is in the official quickstart guide.

bash
curl -fsSL https://claude.ai/install.sh | bash

Run curl, then open a new terminal

Copy the curl command into the terminal, press Enter, and wait for the end. Close the terminal and open another before testing, because the old session cannot see the new path. That fresh-terminal step resolves a good share of command-not-found cases.

Use brew cask on Mac, with manual upgrades

Reach for brew only if you already keep Homebrew current on Mac. Installation uses a cask, and upgrades stay manual when a new version ships, per the official quickstart guide.

bash
brew install --cask claude-code
brew upgrade --cask claude-code

Use npm once Node 22 is ready

Use npm when you already tend Node and prefer managing the tool alongside other global packages. The condition is blunt, Node 22 or newer before installing, with the requirement documented in the official quickstart guide. The native-channel versus npm comparison, with each side's trade-offs, sits in the getting-started guide, published Apr 8, 2026.

bash
node --version
npm install -g @anthropic-ai/claude-code

How to sign in and make sense of pricing

Screen with code while signing in with the right account
Photo: Marc Chouinard via StockSnap (CC0).

Sign in with an account that carries usage rights. The options are Pro, Max, Team, or Enterprise subscriptions, or Console and Bedrock access for company and cloud setups, per the official quickstart guide. The flow opens a browser to confirm the account, so finish that browser step and return to the terminal.

The most common failure is signing in on the free plan. Free leaves out Claude Code, so a block there signals no install failure, per the roundup published Jul 14, 2026 in the guide to what Claude Code is. If the message mentions plan or permission, check which account is signed in before reinstalling.

Match the account to your setting to avoid mid-day switches. Pro or Max for solo use, Team or Enterprise for teams, Console or Bedrock for company integrations and cloud. After switching machines or an expired session, sign in again and run the next section's diagnostic.

How to confirm it worked and open it in the right place

Desk with a laptop during confirmation with claude doctor
Photo: Negative Space via StockSnap (CC0).

Confirm with two commands in a fresh terminal. The first prints the installed version, the second checks the environment and names what is missing, both documented in the official quickstart guide and the getting-started guide from Apr 8, 2026.

bash
claude --version
claude doctor

Always open inside the project folder, never home. Move there with cd first, because opening in the wrong place widens the agent's reach for no reason. The pattern below holds on every system.

bash
cd path/to/your/project
claude

If the terminal says the command is missing, close it, open another, and repeat the test. If the error persists, check which method you used and repeat the install through one channel only, without alternating curl, brew, winget, and npm. Noting the method makes asking for help much easier.

To turn this install into guided practice, take the cluster's next step: first-30-minutes walkthrough.

Frequently asked questions

Does the free plan include Claude Code?

It does not. Access requires Pro, Max, Team, Enterprise, Console, or Bedrock, per the roundup published Jul 14, 2026 in the guide to what Claude Code is. On the free plan with a block, the correct move is upgrading to an entitled plan or using company access, not reinstalling.

Do I need Node 22 to install?

Only if you pick the npm channel. The curl, irm, brew cask, and winget channels ask nothing of Node, per the official quickstart guide. If node --version prints below 22, upgrade Node or switch to your system's native channel.

Native channel or npm, what changes?

The native channel uses the system installer and follows each platform's standard flow. Npm installs a global package and suits people who already keep Node current. That native-versus-npm comparison sits in the getting-started guide from Apr 8, 2026. When in doubt, take the native channel and keep npm as plan B.

The terminal says claude is missing. What now?

Close the terminal and open another before anything else, because the new path only shows up in the fresh session. Then run claude --version and claude doctor to confirm, both covered in the official quickstart guide and the getting-started guide from Apr 8, 2026. If the error stays, reinstall through one channel and note the exact message.

Conclusion

A calm install comes down to three decisions in order. Pick your system's channel, sign in with an entitled account, and confirm with version plus diagnostics inside the project folder. That order dodges method mixing, the free-plan trap, and opening in the wrong folder.

Continue with the guided drill in first-30-minutes walkthrough. Then lock safety in CLAUDE.md and safe permissions.

Sources