Part ofWhat Is Claude Code? The Complete Guide
In This Article
8 sectionsQuick answer
A complete Claude Code installation guide: prerequisites, the native installer, the npm command, platform notes for macOS, Linux, and Windows, and fixes.
Claude Code installation now takes a single command. The recommended method is the native installer: on macOS, Linux, or WSL you run one curl command, and on Windows you run one PowerShell command. All you need first is a terminal and a paid Claude account (Pro, Max, Team, Enterprise, or Console). That is the entire setup.
Installer commands and platform requirements verified 31 July 2026 against the official Claude Code setup documentation.
If you are brand new to the tool, it helps to understand what Claude Code is before you install it: it is Anthropic's agentic coding assistant that lives in your terminal, reads your codebase, and edits real files in your project. This guide walks through every step of a clean install, from prerequisites to your first authenticated session, and covers the fixes for the problems people hit most often.
Key takeaway
Claude Code installation is a single command — curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux, or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell — and the recommended native installer bundles its own runtime, so Node.js is needed only for the optional npm method (which requires Node 22 or later).
What you need before you begin
Three things only: a terminal, a supported operating system (macOS 13 or newer, Windows 10 build 1809 or newer, or a modern Linux), and a paid Claude plan. Node.js is optional and matters only for the npm route.
Setup is deliberately light on prerequisites. You really only need three things:
- A terminal or command prompt. Bash, Zsh, PowerShell, and CMD all work. If the terminal is new to you, that is fine — you will only type a few commands.
- A supported operating system. That means macOS 13 or newer, Windows 10 (build 1809+) or Windows Server 2019+, or a modern Linux such as Ubuntu 20.04+, Debian 10+, or Alpine 3.19+. You also want at least 4 GB of RAM and an internet connection.
- A paid Claude account. Claude Code needs a Pro, Max, Team, Enterprise, or Claude Console (API) plan. The free Claude.ai chat plan does not include it, so it is worth confirming whether Claude Code is free on your current subscription before you begin.
What about Node.js? The recommended native installer bundles everything it needs and does not require Node.js at all. You only need Node.js if you choose the npm method (covered below), and that path now requires Node.js 22 or later. Even so, most developers want a working Node runtime for their own projects, so it is worth following a proper Node.js setup for Claude Code either way.
The recommended Claude Code installation: the native installer
One self-contained binary, no runtime to manage, and background auto-updates. Run the curl script on macOS, Linux or WSL, or the PowerShell one-liner on Windows, then launch claude from any project folder.
For most people, the fastest route is the official native installer. It downloads a single self-contained binary, needs no Node.js, and — unlike the other methods — updates itself quietly in the background so you always stay current.
On macOS, Linux, or WSL, run:
curl -fsSL https://claude.ai/install.sh | bash
On Windows (in PowerShell), run:
irm https://claude.ai/install.ps1 | iex
That is it. When the installer finishes, open a terminal in the project you want to work on and launch the tool by typing claude. This native route is the one Anthropic recommends for new users, and the full command set and options live in the official Claude Code setup documentation.
Prefer a package manager? Claude Code also ships through Homebrew (brew install --cask claude-code) on macOS and Linux, and through WinGet (winget install Anthropic.ClaudeCode) on Windows. These behave like any other managed package, but keep one thing in mind: they do not auto-update, so you upgrade them yourself.
Installing Claude Code with npm
npm install -g @anthropic-ai/claude-code gets you the same binary if npm is already your standard. It wants Node.js 22 or later, never sudo, and @latest rather than npm update -g when you upgrade.
If you already manage your tooling through npm, or you work somewhere npm is the standard, you can install Claude Code as a global package instead. This is the classic method, and the command is short:
npm install -g @anthropic-ai/claude-code
A few things are worth knowing about the npm route. First, it requires Node.js 22 or later; on an older version npm prints an EBADENGINE warning but still completes, because the package downloads the same native binary the standalone installer uses. Second, do not run it with sudo — sudo npm install -g invites permission and security problems, and if you hit permission errors you should fix your npm prefix instead. Third, to upgrade later, run npm install -g @anthropic-ai/claude-code@latest rather than npm update -g, which may not move you to the newest release.
Whichever route you choose, the end result is identical: the same claude binary on your PATH.
Platform notes for macOS, Linux, and Windows
The command barely changes across systems, but the details do: Homebrew on macOS never auto-updates, Alpine also wants libgcc, libstdc++ and ripgrep, and Windows runs natively from PowerShell with no WSL involved.
The core command is nearly the same everywhere, but each platform has a couple of quirks worth knowing. Here is a quick reference by operating system:
| Platform | How to install | Notes |
|---|---|---|
| macOS | curl -fsSL https://claude.ai/install.sh | bash or brew install --cask claude-code | Needs macOS 13 or newer. Native installer and Homebrew both work; Homebrew does not auto-update. |
| Linux | curl -fsSL https://claude.ai/install.sh | bash, or the apt/dnf/apk repositories | Works on Ubuntu 20.04+, Debian 10+, Fedora, RHEL, and Alpine 3.19+. Alpine also needs libgcc, libstdc++, and ripgrep. |
| Windows (native) | irm https://claude.ai/install.ps1 | iex in PowerShell | Runs natively — no WSL required. Installing Git for Windows is optional but enables the Bash tool. |
| Windows (WSL) | Run the macOS/Linux installer inside your WSL distribution | Install and launch claude inside WSL, not from PowerShell. WSL 2 also unlocks sandboxed command execution. |
Windows deserves a special mention because it genuinely works two ways. You can run a native Windows install straight from PowerShell or CMD, or you can install inside WSL for a Linux-style toolchain. Our dedicated guide to Claude Code on Windows walks through both paths and helps you decide which fits your projects.
We build and maintain InnovateTechie from a native Windows PowerShell setup, no WSL, so we can vouch that the PowerShell one-liner is genuinely all it takes. The only hiccup we ever hit on a fresh install was assuming it had failed when claude came back unrecognized in the same window we ran the installer in — the binary was on disk fine, the shell just had a stale PATH. Closing that terminal and opening a new one fixed it every time, and it is the first thing we now tell anyone who reports a "broken" install before they start debugging anything deeper.
Your first run: launch and authenticate
Change into a project folder, type claude, and sign in through the browser prompt with your Pro, Max, Team or Enterprise plan — or with a Console account or API key. Credentials persist afterwards.
With the binary installed, the last step of any Claude Code installation is signing in. Move into a project folder and start a session:
cd /path/to/your/project
claude
The first time you run claude, it prompts you to log in. If you have a Claude subscription (Pro, Max, Team, or Enterprise), choose the browser option and approve access in the tab that opens — this is the quickest path. If you use API access instead, you can authenticate with a Claude Console account or an API key. Either way, your credentials are stored afterward, so you only do this once. For every account type and the occasional edge case, see our guide to authenticating Claude Code in the terminal.
Once you are signed in, you will see the Claude Code prompt with the version, current model, and working directory shown above it. Type /help to list the available commands, or just ask a plain-English question like "what does this project do?" to feel it out.
How do you verify a Claude Code installation?
Run claude --version and confirm a number prints. For a deeper check, claude doctor validates your PATH, configuration and the most recent auto-update. A clean report plus a live session means you are done.
To confirm the Claude Code installation succeeded, check the version:
claude --version
You should see a version number print out. If you want a deeper health check — including your PATH, configuration, and the result of the most recent auto-update — run claude doctor. A clean claude doctor report plus a working interactive session are the two clearest signs that your Claude Code installation is complete and healthy. If either fails, jump to the troubleshooting section below.
Updating and uninstalling Claude Code
Native builds update themselves in the background, and claude update forces one immediately. Package-manager installs upgrade on your schedule. Removal means deleting the launcher and data directories, or running the npm uninstall command.
Keeping Claude Code current is mostly automatic. Native installations update themselves in the background, so there is usually nothing to do. To force an update immediately, run claude update. Homebrew, WinGet, and Linux package-manager installs update on your own schedule instead. For release channels, version pinning, and update troubleshooting, see how to update Claude Code.
Uninstalling is just as simple, and our full guide to uninstalling Claude Code covers the leftover config files the commands below leave behind. If you used the native installer on macOS, Linux, or WSL, remove the launcher and version files:
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
If you installed with npm, remove the global package instead:
npm uninstall -g @anthropic-ai/claude-code
Fixing the problems people hit most
A stale PATH, a Node.js version below 22, sudo-driven permission errors, the wrong Windows shell, a proxy blocking the download, or an antivirus false positive. Nearly every failure is one of those six.
Most install issues come down to a handful of causes. Here are the ones people hit most, with quick fixes:
claude: command not foundright after installing. Your shell has not picked up the new binary yet. Close the terminal completely and open a fresh one so the updated PATH loads. This single step resolves the majority of "it installed but won't run" reports.- Node.js too old or missing (npm method). If npm shows an
EBADENGINEwarning or the install fails outright, your Node.js is below version 22. Update Node to a current LTS and re-run the install — the native installer avoids this problem entirely because it needs no Node. - Permission errors with global npm. Do not reach for
sudo. Instead, point npm at a user-writable global directory (set an npm prefix in your home folder), then run the install again. This sidesteps the security pitfalls of installing global packages as root. - Wrong shell on Windows. If
irm ... | iexerrors with'irm' is not recognized, you are in CMD, not PowerShell — switch shells and try again. After any native install, reopen the terminal so the PATH change takes effect. - Corporate network or a 403 during download. If the installer command fails with a
403or asyntax error near unexpected token '<', a proxy or firewall is probably blocking the download. Retry on an unrestricted network, or use the npm method instead. - Antivirus blocks or quarantines the installer. If a security suite interrupts the download or flags the new binary, it is almost always a false positive — here is how to get Claude Code past a Bitdefender false-positive detection by whitelisting it so the install can finish.
If you get stuck, the official Claude Code quickstart is the canonical reference and mirrors every step above. Between it and the fixes here, a broken install is almost always a five-minute problem, not a five-hour one. Once it runs, our stage-by-stage guide to learning Claude Code takes you from first session to fluent.
Terminal only? Claude terminal install compares the four methods on the thing that matters later: which ones auto-update.
Frequently Asked Questions

Written by
InnovateTechie
Writing about Claude and the Anthropic toolkit — models, Claude Code, pricing, features, and fixes, in clear, practical, hands-on guides tested by daily use.
View all posts →


