Guide

How to install Claude Code

Harrowtech.ai · last checked 13 October 2026

Claude Code is Anthropic's coding assistant that runs in your terminal. This page gives the install commands for Windows, Mac and Linux, how to sign in, and the fix for each error people hit most.

Harrowtech.ai is an independent UK company and is not part of Anthropic. The steps below follow Anthropic's own setup documentation, checked on the date above. Commands change, so if something fails, Anthropic's setup page is the source of truth.

What you need first

Install Claude Code

Open a terminal and run the line for your system. The installer shows no progress while it downloads, so give it a minute.

Mac, Linux or Windows with WSL:

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

Windows PowerShell (your prompt starts with PS C:\):

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

Windows CMD (your prompt starts with C:\, no PS):

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

Prefer a package manager? On a Mac, brew install --cask claude-code works. On Windows, winget install Anthropic.ClaudeCode works. Those two do not update themselves, so you run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode now and then. The standard installer above updates itself in the background.

Windows: native or WSL?

Native WindowsRuns from PowerShell or CMD. Git for Windows is optional, but with it Claude Code can use the Bash tool. Good for Windows-only projects.
WSL 2You open your Linux distribution and run the Linux installer there, then start claude inside that terminal. This is the better choice if your tools are Linux ones, and it supports sandboxed commands.

One tip from Anthropic's troubleshooting guide: keep your project inside the Linux file system (under /home/), not on /mnt/c/, or searches can be slow and return fewer results.

Check it worked

Open a new terminal window and run:

claude --version

A working install prints a version number. For a fuller health check, run claude doctor.

Start it and sign in

Go to the folder of the project you want to work on and run:

claude

The first time, follow the browser prompts to sign in with your Claude account. If you have an ANTHROPIC_API_KEY set and approve it when asked, Claude Code skips the sign-in step.

Fixing the common errors

"command not found: claude" or "'claude' is not recognized"

The install worked but the folder it uses is not on your PATH. The installer puts claude in ~/.local/bin (Mac, Linux, WSL) or %USERPROFILE%\.local\bin (Windows).

Mac or Linux with Zsh:

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

Linux or WSL with Bash: use the same two lines with ~/.bashrc instead of ~/.zshrc. Then check with claude --version.

Windows PowerShell:

$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')

Then close the terminal and open a new one. A terminal inside an editor takes its PATH from the editor, so quit and reopen the editor too.

"The token '&&' is not a valid statement separator" or "'irm' is not recognized"

You ran the wrong line for your terminal. The first message means you are in PowerShell and ran the CMD line. The second means you are in CMD and ran the PowerShell line. Check your prompt: PS C:\ is PowerShell.

"syntax error near unexpected token '<'" or a 403 error

The install address returned a web page instead of the script. Anthropic's installation troubleshooting page lists the fix for each message and other ways to install.

Search or @file mentions do not find your files

The bundled search tool (ripgrep) may not run on your system. Install your own copy (brew install ripgrep on a Mac, sudo apt install ripgrep on Ubuntu or Debian, winget install BurntSushi.ripgrep.MSVC on Windows). Then add this to your settings.json:

{
  "env": {
    "USE_BUILTIN_RIPGREP": "0"
  }
}

Update and uninstall

Update by hand any time with claude update. To remove a standard install on Mac, Linux or WSL:

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

That leaves your settings and history in ~/.claude. Delete that folder as well only if you want them gone for good.

Questions

Is Claude Code free?

No. The free Claude plan does not include it. You need a paid plan or a Console account. See Claude Code pricing.

Can I use it without the terminal?

Yes. Anthropic offers a Desktop app for Mac and Windows, with Linux (Ubuntu and Debian) in beta, that runs Claude Code with a graphical interface. See Claude Code desktop app vs terminal.

Is it safe to run the install line?

It comes from Anthropic's own address (claude.ai). If you want to be careful, Anthropic publishes signed checksums for each release, and its setup page explains how to verify them.

Want it set up properly for your team?

Harrowtech.ai sets up coding tools with the rules and guardrails around how your developers work, from £720 (1 day), and runs half-day coding tools training from £360. The first session is free. See pricing.

Get in touch

Sources

Related: All Harrowtech.ai guides · Claude Code pricing · Claude Code API key and login