Building with Claude

How to Install Claude Code (Mac, Windows, and Linux)

By Daniel ImadUpdated June 28, 20265 min read

The short version

  • Claude Code installs with a single command once you have Node.js — the software is free to install; running it needs a paid Claude plan or API credits.
  • On macOS and Linux it's a one-liner in the terminal; on Windows the smoothest path is WSL (a Linux environment inside Windows).
  • After installing, you run `claude` in your project folder and sign in once — then it works inside your normal terminal and editor.
  • Most install problems come down to one of three things: missing Node.js, an old Node version, or permission errors — all quick to fix.

Short answer: Install Node.js (version 18 or newer), then run one command — npm install -g @anthropic-ai/claude-code — in your terminal. On macOS and Linux that's it; on Windows, do it inside WSL (a Linux environment inside Windows) for the smoothest experience. Then run claude in your project folder and sign in once. The install is free; running it needs a paid Claude plan or API credits.

Claude Code lives in your terminal, so "installing" it is really just installing a command-line tool — quick once you have the one prerequisite in place. Here's the whole thing, step by step, on each platform. (New to it? Start with what is Claude Code and how it works.)

Before you install: the one prerequisite

Claude Code runs on Node.js, so you need that first:

  • Install Node.js version 18 or newer from nodejs.org (or with a package manager — brew install node on Mac, your distro's package manager on Linux).
  • Check it worked: run node --version in your terminal. If it prints something like v18.x or higher, you're set.

That's the only hard requirement. Everything below is one command.

How to install Claude Code on macOS

macOS is the smoothest platform:

  1. Open Terminal.
  2. Make sure Node.js 18+ is installed (node --version).
  3. Run the install command:
    npm install -g @anthropic-ai/claude-code
    
  4. Go to a project folder (cd ~/your-project) and run claude. Sign in once when prompted.

Done — you can now give it tasks from inside that project.

How to install Claude Code on Windows

On Windows, the cleanest path is WSL (Windows Subsystem for Linux) — a real Linux environment inside Windows where Claude Code runs without the usual cross-platform friction:

  1. Install WSL (Microsoft's docs walk you through it — it's a one-time setup).
  2. Open the Linux terminal WSL gives you.
  3. Install Node.js 18+ inside that environment.
  4. Run the same command:
    npm install -g @anthropic-ai/claude-code
    
  5. cd into your project and run claude.

You can run it directly in plain Windows, but WSL avoids most path and permission headaches — it's worth the few minutes.

How to install Claude Code on Linux

Linux works just like macOS:

  1. Make sure Node.js 18+ is installed (your distro's package manager, or nodejs.org).
  2. Run npm install -g @anthropic-ai/claude-code.
  3. Run claude in your project and sign in.

First run: what happens after install

The first time you run claude in a project, it asks you to sign in with your Claude account. After that, you describe a task in plain language and it gets to work — reading the relevant code, making the change, running tests, and showing you the result to approve.

Remember: installing is free, but running it isn't. You'll need a paid Claude plan (Pro, ~$20/month) or API credits — see is Claude Code free for which option fits.

When the install fails: the three usual culprits

If npm install errors out, it's almost always one of these:

  • Node.js isn't installednode --version fails entirely. Install Node 18+ first.
  • Node is too old — it prints something below v18. Update Node; old versions aren't supported.
  • Permission error on the global install — the command fails with an access/EACCES error. The right fix is to correct your npm global-folder permissions (npm's docs cover this) rather than forcing it with sudo, which can cause more problems later.

Fix the Node version first — that one clears the large majority of failed installs.

The bottom line

Installing Claude Code is a single command on top of one prerequisite (Node.js 18+). macOS and Linux are a clean one-liner; Windows is smoothest through WSL. The friction isn't the install — it's remembering that running it needs a paid plan, and that a skilled person still directs and reviews what it does. Set up that way, it's one of the fastest ways a team can ship.

Building with Claude and want it done right — directed and reviewed by senior engineers, not run unsupervised? That's exactly how we work.

Frequently asked questions

How do I install Claude Code?

Install Node.js (version 18 or newer), then run one command in your terminal: `npm install -g @anthropic-ai/claude-code`. After that, go to your project folder, run `claude`, and sign in once with your Claude account. The software is free to install; actually running it needs a paid Claude plan (Pro/Max) or API credits.

How do I install Claude Code on a Mac?

On macOS, open Terminal, make sure Node.js 18+ is installed (you can get it from nodejs.org or via Homebrew with `brew install node`), then run `npm install -g @anthropic-ai/claude-code`. Once it finishes, `cd` into your project and run `claude` to start. macOS is the smoothest platform for it.

How do I install Claude Code on Windows?

The recommended way on Windows is to use WSL (Windows Subsystem for Linux) — it gives you a Linux environment inside Windows where Claude Code runs cleanly. Install WSL, open the Linux terminal, install Node.js 18+, then run `npm install -g @anthropic-ai/claude-code`. Running it directly in plain Windows is possible but WSL avoids most headaches.

Why won't Claude Code install?

Almost always one of three things: Node.js isn't installed, your Node version is too old (it needs 18+ — check with `node --version`), or a permissions error on the global install (try fixing your npm permissions rather than forcing it with sudo). Fix the Node version first; that clears most failures.

Is Claude Code free to install?

Yes — installing the software costs nothing. But you can't really use it for free: running it needs a paid Claude subscription (Pro is around $20/month) or pay-as-you-go API credits. See is Claude Code free for the full breakdown.

How RedZen can help

We build with Claude Code in the loop — senior-team quality at a pace that used to be impossible. The AI does the heavy lifting; our engineers direct and review every change. You get software shipped faster, for less.