Skip to content

Installing Claude Code: ready in 10 minutes ​

In the previous lesson you settled on a main track from the four tools; in this lesson, in 10 minutes, you complete three things—Claude Code installation, verification, and login—bringing the tool to a "working" state. This page follows the officially recommended native installation route—one command, with automatic background updates after installation; alternative methods like npm, Homebrew, and WinGet go to the next lesson and won't be covered here.

Never used a terminal? No problem: the official docs include a guide written specifically for terminal beginners, whose opening line is "Even if you've never used the terminal, you can use Claude Code." This lesson starts from "where the terminal is and how to open it." (Fact-checked 2026-11-04; commands and policies may change, so the official page prevails.)

What you'll be able to do after this lesson ​

  • Complete Claude Code installation on macOS, Linux/WSL, or Windows with a single official command
  • Print the version number with claude --version to confirm the command is installed and the system can find it
  • Distinguish the two login routes—Claude subscription and Console account—and complete your first login (log in once, credentials saved)
  • Launch Claude Code in your project directory, ask your first question, and see with your own eyes it reads files and gives answers
  • When you hit errors like command not found or a pile of HTML, know which page to check in 60 seconds

Where you are stuck right now ​

  • You search "Claude Code installation tutorial"—one article says install via npm, another says brew, yet another says install a bunch of dependencies first—you don't know which to follow and fear messing up your system
  • Never used a terminal: you don't know where it is or how to open it; after pasting a command there's "no response at all," and you can't tell whether it's downloading or already broken
  • Mac and Windows commands differ, and on Windows, PowerShell and CMD are two different things—copy one wrong command, get an error you can't read, and get stuck at step one

When to use this approach ​

When you need to:

  • Follow the officially recommended native installation route and get Claude Code installed, verified, and logged in all at once
  • Stay on the latest version automatically after installation, without manual upgrades every month
  • Start from "how to open the terminal" and follow along step by step from zero

And you don't want to:

  • Get lost among a pile of installation methods—npm, Homebrew, WinGet—alternative methods are all covered in the next lesson
  • Discover halfway through installation that your system version, regional policy, or account type doesn't qualify
  • Search all over the place after an error and turn a small issue like PATH, fixable in 30 seconds, into a big one

🎒 Preparation before you start ​

  • Finish the previous lesson How to choose among the four tools and confirm your main track is Claude Code—if you really don't want to touch the command line, go straight to Alternative installation methods to see the WorkBuddy desktop version
  • A computer that meets the "system requirements" below, with network access to claude.ai (the install command downloads the installer from claude.ai)
  • An account you can log in with, one of two options: a Claude subscription (Pro from $20/month, plus Max/Ultra/Team/Enterprise) or an Anthropic Console account (API pay-as-you-go prepaid)—see the full pricing table in Pricing comparison
  • A project folder to practice in; if you don't have one, that's fine—the official guide says you don't need a project, Claude can help you build one from scratch
  • 10 minutes of uninterrupted time

System requirements ​

ItemOfficial requirement
Operating systemmacOS 13.0+; Windows 10 1809+ (or Windows Server 2019+); Ubuntu 20.04+ / Debian 10+ / Alpine 3.19+
Memory and processor4 GB+ RAM; x64 or ARM64 processor
NetworkInternet connection required
ShellBash, Zsh, PowerShell, or CMD
RegionAnthropic's list of supported regions (see the note box below)

⚠️ Regional policy: check before installing

Anthropic's Supported Regions Policy (version effective 2026-11-12) states clearly: its products—including Claude.ai, Claude Code, and the API platform—are provided only in the countries and regions listed; the list does not include mainland China, Hong Kong, or Macau (Japan, Singapore, South Korea, and Taiwan are on the list). The policy states verbatim: countries and regions not on the list are unsupported, including users located in unsupported regions.

This tutorial only states policy facts, offers no workarounds, and does not extrapolate "mainland China is not on the list" into "it's completely unusable in China"; policies may change, so the latest official page prevails.

Core idea ​

Claude Code installation has only three main things: open a terminal → paste one official command → open a new terminal to verify. Logging in and asking your first question are the finishing touches, taking 10 minutes in total.

Why this lesson takes the "native installation" route, the one officially recommended:

Installation routeOne-line summaryWhere it's covered
Native installation (officially recommended)One command; auto-updates in the background after installation, staying on the latest versionThis lesson's main path
npm / Homebrew / WinGet / apt, etc.For users with an existing toolchain; no auto-update after installation (except npm)Next lesson Installing alternative methods
Claude Code Desktop / WorkBuddy DesktopNever touch the terminalThis lesson's "Advanced tips" + next lesson

Before starting, remember three key facts that help you avoid 90% of beginner pitfalls:

  1. It's normal to see "no progress indicator at all" during the download. After the install command runs, the window may look unresponsive—the official docs state plainly: the command shows no progress while downloading Claude Code. It's not frozen; don't close the window.
  2. After installation, open a new terminal window before verifying. The old window doesn't recognize the newly installed command (PATH hasn't refreshed); command not found usually means you didn't open a new window.
  3. A terminal is just a window where you "type → press Enter → execute". You can't click things inside it with the mouse; use the arrow keys to move around. The official team wrote a dedicated guide for terminal beginners, and this lesson's steps expand on it.

Follow along with me ​

Step 1: Open a terminal—the first door to installing Claude Code ​

Why: Claude Code is a tool used inside a terminal, and every command in this lesson happens in a terminal window. Open it first.

Match your system:

  • macOS: press Cmd + Space to open Spotlight, type Terminal, press Enter
  • Linux: press Ctrl + Alt + T, or search for "Terminal" in the applications menu
  • Windows: press Win + X, then choose Windows PowerShell (or "Terminal")

Windows users, take a closer look: PowerShell and CMD are two different command-line programs. To tell them apart, look at the start of each line—PowerShell has PS (e.g., PS C:\>), CMD doesn't. This lesson's main Windows path uses PowerShell.

You should see: a new window with a blinking cursor—this is the terminal, where you type commands.

  • Quick check: I can say whether I opened a macOS/Linux terminal or Windows PowerShell

Step 2: Paste the install command and start the Claude Code installation ​

Why: Native installation is the officially recommended route: one command downloads the installer from claude.ai and completes the installation, after which it auto-updates in the background—so you won't need to upgrade manually later.

macOS / Linux / WSL users ​

Copy this command, paste it into the terminal (use Cmd + V on macOS, Ctrl + Shift + V on Linux), and press Enter:

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

Windows users ​

Paste it into PowerShell (Ctrl + V or right-click), then press Enter:

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

irm downloads the installation script, and iex runs it.

If you opened CMD (no PS at the start of the line), use this instead:

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

💡 Windows users: consider installing Git for Windows while you're at it

The official recommendation for Windows users is to install Git for Windows: with it, Claude Code can use the Bash tool; without it, things still work—Claude Code will fall back to PowerShell. During installation, just keep clicking Next and accept the defaults. Those using WSL don't need to install it.

You should see: after the command runs, there is no progress indicator at all—the download happens in the background and the window may look "unresponsive." This is normal; don't close it. When it finishes, it prints Claude Code successfully installed!.

  • Quick check: I saw Claude Code successfully installed! (if you hit an error, don't panic: match it against "Pitfall reminders" below, or jump straight to What if the installation fails for a 60-second lookup)

Step 3: Open a new terminal and verify the installation with claude --version ​

Why: This verifies two things—the command is installed, and the system can find it (PATH is fine). You must run it in a newly opened terminal window: the old window doesn't recognize the newly installed command.

Open a new terminal window (you can close the previous one) and type:

bash
claude --version

You should see: a version number followed by (Claude Code), for example:

text
2.1.211 (Claude Code)

The version number changes as new versions are released; trust whatever yours prints.

If you get command not found: claude (macOS/Linux) or 'claude' is not recognized (Windows): the installation directory isn't in PATH yet. The installer printed the exact fix command under Setup notes when it finished; see What if the installation fails for the full steps.

  • Quick check: claude --version printed a version number with (Claude Code)

Step 4: Go to your project directory, launch for the first time, and log in ​

Why: Claude Code works in the "current directory"—enter your project folder before launching so it reads that project's files.

Type this in the terminal (replace the path with your own project):

bash
cd /path/to/your/project
claude

No project yet? No problem—in the official guide's own words: you don't need one, Claude can help you start a new one. Just go into any folder where you keep practice files.

The first launch prompts you to log in; complete authentication in the browser as instructed. Two account paths:

Account typeWhat it isWho it's for
Claude subscription (Pro / Max / Ultra / Team / Enterprise, officially recommended)A claude.ai subscription account, Pro from $20/monthMost individual users
Anthropic Console accountPay-as-you-go prepaid API credits; on first login a "Claude Code" workspace is created automatically, making it easy to track spending in one placeDevelopers who want pay-as-you-go billing

After logging in once, your credentials are saved, so you won't need to log in again on future launches. (Advanced: if the ANTHROPIC_API_KEY environment variable is set, Claude Code will ask whether to use it; confirm and the login prompt is skipped.)

You should see: the browser opens the authentication page, and when it finishes you return to the terminal—the Claude Code prompt appears, with the version number, current model, and working directory shown above it. Type /help to see the available commands.

  • Quick check: login is complete and the terminal shows a prompt with the version number, model, and working directory

Step 5: Ask your first question to confirm Claude Code actually works ​

Why: claude --version only proves it's "installed"; asking a question and watching it read files and answer proves it "works".

In Claude Code, type:

text
what does this project do?

You should see: Claude analyzes your project files and gives a summary—when it needs a file, it reads it itself, with no manual copying and pasting of code required.

Try one more—ask it what it can do:

text
what can Claude Code do?

Three immediately useful operations: /help to see available commands; Esc to interrupt a running Claude; exit or pressing Ctrl+D twice to exit.

  • Quick check: Claude answered my first question—all five installation steps are done

Checkpoint ✅ ​

  • I installed Claude Code using the official native install command (macOS/Linux/WSL and Windows PowerShell/CMD each have their own command)
  • I opened a new terminal and ran claude --version, which printed the version number + (Claude Code)
  • I completed the first login (choosing either a Claude subscription or a Console account) and know that my credentials are saved so I don't have to log in again each time
  • I started Claude Code in my project directory, asked my first question, and got an answer
  • I know that the native installation auto-updates in the background, and that if errors come up I can check What to Do If Installation Fails for a quick lookup

Pitfall Warnings ​

❌ After pasting the command there was "no response", so I thought it froze and closed the window ​

During the download, the native install command shows no progress at all, so the window looks stuck—the official documentation explicitly says this is normal. Wait until it prints Claude Code successfully installed! before doing anything. On a slow connection, this step may take a while.

❌ After installing, I ran claude in an old window and got command not found / 'claude' is not recognized ​

Cause: the installation directory isn't on that window's PATH yet. The correct fix: open a new terminal window and run claude --version again; if it still fails, fix the PATH with the command printed at the end of the installer under Setup notes—full steps are in What to Do If Installation Fails.

❌ I ran a CMD command in PowerShell (or vice versa) ​

  • If you see The token '&&' is not a valid statement separator → you're in PowerShell and ran a CMD command
  • If you see 'irm' is not recognized → you're in CMD and ran a PowerShell command

To tell them apart, look at the start of the line: PowerShell has PS, CMD doesn't. Just rerun with the matching command.

❌ The install command printed a bunch of HTML / syntax error near unexpected token '<' ​

Cause: the install URL returned a web page instead of the install script. Official troubleshooting guidance: first rerun it once; if the page says "App unavailable in region", that's due to regional policy—see the "Regional Policy" callout above for the facts; this tutorial does not provide workarounds; otherwise you can switch to Homebrew (brew install --cask claude-code, covered in detail in the next lesson) or check What to Do If Installation Fails.

Advanced Tips (Optional) ​

Really don't want to touch the terminal? Two ways out.

  • Claude Code Desktop: the official desktop app, no terminal needed; official downloads are available for macOS and Windows, with the same account requirements as the terminal version
  • WorkBuddy Desktop: this tutorial's zero-command-line alternative route—made by Tencent, log in by scanning a QR code in WeChat; installation steps are in Alternative Installation Methods

Already have a toolchain? npm, Homebrew, WinGet, and apt/dnf/apk can all install Claude Code; of these, Homebrew, WinGet, and apt/dnf/apk do not auto-update after installation (only the native install does), while npm can auto-update—but requires the npm global directory to be writable—the commands and update rules for each method are covered together in the next lesson.

The terminal isn't the only form. Claude Code also comes as a VS Code / JetBrains plugin, a web version, and more—get the terminal version working first; the other forms are covered in Claude Code Usage.

Lesson Summary ​

✅ The main installation path for Claude Code = open a terminal → paste one native install command → open a new terminal and verify with claude --version → log in → ask your first question. Once these five steps are done, the tool is in a "working" state.

✅ The native installation auto-updates in the background; alternative methods like Homebrew/WinGet do not auto-update (npm is the exception—it auto-updates depending on global directory permissions), covered in the next lesson.

✅ Two login routes: a Claude subscription (Pro from $20/month, officially recommended) or a Console account (API pay-as-you-go prepaid); log in once and your credentials are saved.

✅ System requirements: macOS 13.0+ / Windows 10 1809+ / Ubuntu 20.04+ etc.; 4 GB of memory as a starting point.

✅ Regional policy facts: Anthropic's list of supported regions (the 2026-11-12 effective version) does not include mainland China—stating facts only, no workaround advice.

✅ Don't panic over errors: command not found, HTML errors, mixing up PowerShell/CMD—you can match any of them in seconds via What to Do If Installation Fails, in 60 seconds.

Key commands recap:

CommandPurposePlatform
curl -fsSL https://claude.ai/install.sh | bashNative installmacOS / Linux / WSL
irm https://claude.ai/install.ps1 | iexNative installWindows PowerShell
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdNative installWindows CMD
claude --versionVerify installationAll platforms
cd /path/to/your/project then claudeEnter the project and launch for the first timeAll platforms

Next Lesson Preview ​

The main path is set up, but the alternative methods haven't been covered yet. In the next lesson, Installing Alternative Methods: npm, Homebrew, WinGet, and the WorkBuddy Desktop Edition.

You will learn:

  • Commands and trade-offs of the three alternative installation methods: npm / Homebrew / WinGet (the Homebrew stable release lags behind by about a week and doesn't auto-update after installation)
  • A fully command-line-free alternative route: downloading and installing the WorkBuddy Desktop Edition, and signing in by scanning a QR code in WeChat
  • How each installation method updates: the native installation updates automatically, while Homebrew/WinGet and others require manual upgrades (npm is the exception)
  • How to decide whether you should stay on the main path or switch to an alternative method