Skip to content
Mia Automation
NLEN Sign in Put Mia to workGet started

Installing Claude Code: Pick the Right Version, Install It, Run a First Task

To install Claude Code, run curl -fsSL https://claude.ai/install.sh | bash on macOS or Linux, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. In our tests it took 16 seconds on a Mac that had never had Claude Code, 6 seconds on Ubuntu and 26 on Windows 10. On all three, claude didn't work until we added the install folder to PATH. This guide covers which flavor to install, the PATH fix, the errors we hit and a first task you can check by hand.

Claude in practiceUpdated 7 min read

Tested by us on 11 November 2026.

Animated diagram with five steps lighting up in turn: pick, install, fix PATH, verify with claude --version, first task

Terminal, desktop app or editor extension?

Claude Code comes in three forms that share one settings folder (~/.claude) and one conversation history. You can switch later without losing anything, so pick the one that fits today.

Terminal (CLI)Desktop appVS Code extension
Best forDevelopers, scripts, servers, automationPeople who've never opened a terminalPeople who live in VS Code or Cursor
InstallOne command (below)Download from claude.com/downloadExtension anthropic.claude-code
Gives you claude in a terminalYesNoNo, it bundles its own copy
Runs unattended (cron, CI, claude -p)YesNoNo

Start with the desktop app if the terminal scares you. Install the CLI as soon as you want Claude Code to run on its own, in scripts or on a server.

Requirements

  • macOS 13+, Windows 10 1809+ or Windows Server 2019+, or Linux: Ubuntu 20.04+, Debian 10+, Alpine 3.19+.
  • 4 GB of RAM or more, x64 or ARM64, and an internet connection.
  • A paid plan (Pro, Max, Ultra, Team or Enterprise) or a Console account with API credit. The free claude.ai plan doesn't include Claude Code.
  • No admin rights and no Node.js. Everything installs into your home folder.

Install commands by platform

From Anthropic's setup docs, checked November 11, 2026. Every route installs the same binary; they differ in how updates arrive.
PlatformCommandUpdates
macOS, Linux, WSLcurl -fsSL https://claude.ai/install.sh | bashAutomatic
Windows PowerShellirm https://claude.ai/install.ps1 | iexAutomatic
Homebrewbrew install --cask claude-codeManual: brew upgrade claude-code
WinGetwinget install Anthropic.ClaudeCodeManual: winget upgrade Anthropic.ClaudeCode
Debian/Ubuntu apt repoAdd Anthropic's signed repo, then sudo apt install claude-codeWith your system updates
npm (Node.js 22+)npm install -g @anthropic-ai/claude-codeAutomatic if npm can write without sudo

We use the native installer on every machine because it keeps itself current. The Homebrew cask claude-code follows the stable channel, which the docs describe as typically about a week behind; claude-code@latest gets every release. Windows needs PowerShell-specific PATH commands, covered step by step in our Windows install guide.

PowerShell window on Windows 10: the installer reports version 2.1.322 and that .local\bin isn't on PATH, claude isn't recognized at first and works after the PATH fix (opens at full size)
What it looked like on our Windows PC. Here we extended PATH for that one window only; the Windows guide has the commands that make it permanent.

Install on macOS and Linux

  1. Run the installer

    Open Terminal (Cmd+Space, type Terminal) and paste the command. You can run it from any folder; it installs into your home directory either way. It prints nothing while it downloads, so give it a moment.

    bash
    curl -fsSL https://claude.ai/install.sh | bash
  2. Read the setup notes at the end

    Both our machines reported version 2.1.322 installed at ~/.local/bin/claude, followed by Native installation exists but ~/.local/bin is not in your PATH. The installer doesn't edit your shell profile: our .zshrc had the same checksum before and after.

  3. Add ~/.local/bin to PATH

    macOS uses zsh by default, so the line goes into .zshrc. On Linux with bash, swap in .bashrc. Run it once; running it twice adds a duplicate line.

    bash
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
  4. Verify

    claude --version should print a version, ours was 2.1.322 (Claude Code). claude doctor prints a read-only health check without starting a session: platform, install method, whether auto-updates are on, and any warnings.

    bash
    claude --version
    claude doctor

Sign in and run a first task

cd into a project folder and type claude. A browser window opens for sign-in; use the account that pays for your plan. Always start Claude Code inside the project you want it to touch, since it can read the folder you start in and everything below it.

For a first task, pick something small that produces a result you can check by hand. Ours: a folder containing only facturen.csv, a four-row invoice export with date, client and amount columns, and this prompt:

text
Write a Python script totaal.py that reads facturen.csv and prints the total
amount per client, sorted from high to low. Then run it once and show the output.

On Linux with Claude Code 2.1.321, the script was written and run within 9 seconds. Output: C 300.00, A 165.75, B 80.00. We checked client A by hand (120.50 + 45.25 = 165.75). Unprompted, it used Python's Decimal type for money, which avoids floating-point rounding errors in the cents. A small test like this shows how Claude Code reads, writes and runs before you point it at real books.

Errors and fixes

MessageCauseFixSource
command not found: claude~/.local/bin isn't on PATH.Step 3 above, then open a new terminal.seen
Multiple installations found in claude doctorAn old npm install sits next to the native one.Remove it with npm uninstall -g @anthropic-ai/claude-code, or PATH order decides which one runs.seen
Not logged in · Please run /loginYou ran claude -p before ever signing in.Run claude once with no flags and sign in.seen
syntax error near unexpected token '<' or 403The URL returned a web page instead of the script: an unsupported region, a proxy or a firewall.Retry later, check your network, or use Homebrew, WinGet or npm.docs
EBADENGINE during npm installNode.js older than 22.Only a warning; claude still runs. Better: use the native installer.docs
Permission error on npm install -gYour global npm folder isn't writable.Don't use sudo npm install -g. Switch to the native installer.docs

Uninstall without leftovers

The docs give two commands for removing a native install. After our Mac test, an empty ~/.local/state/claude folder with a locks subfolder was still there, so we add a third line. Settings and history live in ~/.claude and ~/.claude.json; delete those only if you want a completely clean slate.

bash
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
rm -rf ~/.local/state/claude

Questions

Is Claude Code free to install?

Installing is free; using it isn't. You need Pro or higher, or a Console account with API credit. A free claude.ai account can't sign in to Claude Code.

Do I need admin or sudo rights?

No. The native installer writes only to your home folder on macOS, Linux and Windows. Only the Linux apt, dnf or apk route needs sudo.

Can I use Claude Code in VS Code or Cursor?

Yes. Install the anthropic.claude-code extension; Anthropic's docs list Cursor as supported. The extension bundles its own copy, so install the CLI too if you also want claude in a terminal.

How do I check my version and whether auto-updates are on?

claude --version prints the version. claude doctor shows whether auto-updates are enabled and which channel you follow, latest or stable.

Do I need Node.js?

Not for the native installer, Homebrew or WinGet. Only the npm route needs Node.js 22 or later, and even then the installed binary doesn't use Node at runtime.

Sources