Vibe Coding Bootcamp start date · Feb 1, 2027Learn more
ILLITH
Blog

Install Claude Code on Mac, Windows, and Linux: Step-by-Step Guide

One command per system, logging in, updating, and common errors: how to install Claude Code according to Anthropic's official documentation, verified in October 2026.

Antoine Vigneau
Antoine Vigneau
11 min read
Install Claude Code on Mac, Windows, and Linux: Step-by-Step Guide
Listen to article0:00 / 11 min

To install Claude Code, open a terminal and run a single command: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux, and WSL, or irm https://claude.ai/install.ps1 | iex in PowerShell on Windows. This article follows Anthropic's official documentation, reviewed on October 31, 2026. It provides step-by-step installation instructions, log in, updates, and the most common errors.

How to install Claude Code in a few minutes

Installing Claude Code is done through a terminal. First, paste the command for your system. Next, wait for the download to complete, then open a new terminal and type claude. Finally, the first time you run it, Claude Code asks you to sign in via your browser. Furthermore, the installer recommended by Anthropic is the native installation, which updates automatically in the background.

Here is the sequence of steps, from start to finish. The diagram below summarizes them with the exact commands covered in the rest of the article.

Claude Code installation diagram: one command for macOS, one for Linux and WSL, one for Windows PowerShell, then verification with claude --version and the first login
One command per system, then the same sequence: new terminal, verification, login. Commands from the official Claude Code documentation (October 2026).

What you need before installing Claude Code

The official installation page sets out the following requirements.

ItemWhat the documentation states
Operating systemmacOS 13.0 or higher; Windows 10 version 1809 or higher, or Windows Server 2019 or higher; Ubuntu 20.04 or higher; Debian 10 or higher; Alpine Linux 3.19 or higher
HardwareAt least 4 GB of RAM, x64 or ARM64 processor
NetworkAn internet connection is required
ShellBash, Zsh, PowerShell, or CMD
CountryYour country must be included in the list of supported countries by Anthropic
AccountA Pro, Max, Ultra, Team, or Enterprise subscription, or a Console account. The free claude.ai plan does not provide access to Claude Code

Indeed, for the native installation, the documentation does not require Node.js or a version manager like nvm. Node.js 22 or newer is only required if you choose the npm installation, discussed below. However, in both cases, never use sudo npm install -g: the documentation advises against it.

A word on pricing. Subscription prices change, and we do not reproduce them here. Therefore, check the Claude pricing page directly before choosing a plan.

Installing Claude Code on macOS and Linux

Open Terminal, paste this command, then press Enter:

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

It also works on Linux and in WSL. Next, the download displays no progress bar: this is normal, wait until the prompt returns. Then close the window, open a new terminal, and run:

claude --version

A version number followed by "(Claude Code)" confirms that everything is in place. On the other hand, if your shell reports that claude cannot be found, see the troubleshooting section below.

Homebrew and Linux package managers

If you prefer Homebrew, the documentation suggests:

brew install --cask claude-code

Homebrew offers two casks. On one hand, the claude-code cask follows the stable channel, generally about a week behind the latest release. On the other hand, the claude-code@latest cask receives new features as soon as they are released. However, a Homebrew installation does not update automatically: you need to run brew upgrade claude-code or brew upgrade claude-code@latest, depending on the chosen cask.

On Debian, Fedora, RHEL, and Alpine, Anthropic also publishes signed apt, dnf, and apk repositories. The complete commands, along with the signing key, can be found in the dedicated documentation section. We do not copy them here, as they involve multiple steps that the official guide details more effectively.

Alpine Linux

Alpine does not include bash or curl by default. As a result, the installation command fails as long as they are missing. The documentation instructs to install the necessary packages with:

apk add bash curl libgcc libstdc++ ripgrep

It then additionally requires setting USE_BUILTIN_RIPGREP to 0 in Claude Code's settings.json file.

Installing Claude Code on Windows

Windows offers two paths: native installation and installation in WSL. The documentation compares them as follows.

OptionPrerequisitesSandboxingWhen to choose it
Native WindowsNone, Git for Windows is optionalNot supportedWindows-specific projects and tools
WSL 2WSL 2 enabledSupportedLinux tools or sandboxed command execution
WSL 1WSL 1 enabledNot supportedOnly if WSL 2 is unavailable

Native Windows: PowerShell or CMD

You do not need to run the terminal as an administrator. However, identify your window before copying a command: the prompt displays PS C:\ in PowerShell, and simply C:\ in CMD. In PowerShell:

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

In CMD:

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

The classic trap is pasting the PowerShell command into CMD, or vice versa. In CMD, irm is not recognized. In PowerShell, the && token triggers the error "The token '&&' is not a valid statement separator". The troubleshooting documentation points out the same thing: you copied the command for a different shell. Check your prompt, then run the correct command.

There is also a WinGet variant: winget install Anthropic.ClaudeCode. However, it does not update automatically; you need to run winget upgrade Anthropic.ClaudeCode from time to time.

Git for Windows remains optional. Indeed, without it, Claude Code executes its commands via PowerShell. With it, it uses Git Bash.

Windows with WSL

If you prefer WSL, open your Linux distribution and run the Linux command, the one with install.sh. Then, install and start claude from the WSL terminal, not from PowerShell or CMD. Furthermore, the official page assumes WSL is already enabled: it does not cover enabling it, and we do not invent any commands here. If you are looking for how to install WSL, start from the Microsoft documentation.

Claude Code or Claude Desktop: do not confuse them

Two products share similar names. First, Claude Code is the command-line tool described above. Second, the Claude Desktop application is a graphical application that brings together Chat, Cowork, and Claude Code. The documentation also notes that it allows you to use Claude Code without the terminal.

On Linux, the desktop application is in beta. Furthermore, it requires a Debian-based distribution: Ubuntu 22.04 or higher, or Debian 12 or higher, in x86_64 or arm64. On Fedora or Arch, the documentation points to the CLI. So, if you are looking for Claude Desktop for Linux, the official answer is the beta app on Debian or Ubuntu, and the CLI everywhere else.

There is one detail for Windows users. An older version of Claude Desktop may register a Claude.exe that takes precedence over the CLI: the claude command then opens the desktop application instead of the terminal. To fix this, the documentation advises updating Claude Desktop to resolve this behavior.

Logging in for the first time

Navigate to a project folder, then launch Claude Code:

cd /path/to/your/project
claude

Replace the path with that of your folder. When first used, Claude Code prompts you to log in. For a subscription or Console account, follow the steps in your browser. Once logged in, your credentials are saved and you will not have to do it again.

You can choose between several types of accounts:

  • a Claude Pro, Max, Ultra, Team, or Enterprise subscription, recommended by the documentation;
  • a Claude Console account, with API access and prepaid credits;
  • a cloud provider such as Amazon Bedrock, Google Cloud, or Microsoft Foundry, primarily reserved for enterprises.

If the ANTHROPIC_API_KEY environment variable is set and you approve the key when Claude Code prompts you, browser login is skipped. In addition, to switch accounts later, type /login in the current session. Full details for each case can be found on the Authentication documentation page.

Once in the session, ask a first question about the project, for example "what does this project do?". Claude Code then reads the files it needs without you having to add them manually. To go beyond this initial exchange, read our article on Claude Code skills, which turn your repeated instructions into reusable procedures.

Verify, update, and uninstall Claude Code

Verify the installation

Two commands are enough. First, the first one displays the version:

claude --version

Then, the second one, claude doctor, produces a read-only diagnostic without starting a session. It reports the installation status, errors in your configuration files, and recommendations for fixing them.

claude doctor

Updating

Indeed, native installations update in the background: Claude Code checks for updates at startup, then periodically, and the new version takes effect on the next launch. To force the update right away:

claude update

The command responds "Claude Code is up to date" when you are already up to date. In addition, two channels exist, configurable via the autoUpdatesChannel setting: latest, by default, for new features as soon as they are released, and stable, a version about one week old that avoids releases with major regressions. On the other hand, Homebrew, WinGet, apt, dnf, and apk installations do not update automatically by default.

Uninstalling

For a native installation on macOS, Linux, or WSL, the documentation removes the binary and version files:

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

On the other hand, other methods have their own procedure in the "Uninstall Claude Code" section of the installation page. If claude still responds after an uninstall, you likely have a second installation.

Common errors when installing Claude Code

As a result, all the errors below come from the official installation troubleshooting page. It also covers many others, organized by error message.

What you seeWhat the documentation indicates
command not found: claude or 'claude' is not recognizedThe installation folder is not in your PATH. The binary is located in ~/.local/bin/claude on macOS and Linux
syntax error near unexpected token '<'The downloaded script is an HTML page rather than the installation script. Try again, then check the dedicated section
curl: (56) Failure writing output to destinationThe download was interrupted. Check your connection to downloads.claude.ai and run the command again
irm is not recognized or The token '&&' is not a valid statement separatorYou copied the command for a different shell. Use the one for PowerShell or CMD depending on your window
running scripts is disabled on this systemIn the case of an npm installation on Windows: PowerShell's execution policy blocks scripts. It does not affect the PowerShell installer
OAuth error: Invalid codeThe login code has expired or was truncated during copy-paste. Press Enter to try again, or press c to copy the full URL
API Error: 403 Request not allowed after connectingCheck that your subscription is active, or, for a Console account, that you have the "Claude Code" or "Developer" role

Fixing the PATH on macOS and Linux

This is the most common error. Indeed, the installer places claude in ~/.local/bin. If this folder is not in your PATH, the documentation suggests for Zsh:

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

Next, for Bash on Linux, replace ~/.zshrc with ~/.bashrc. On macOS with Bash, the line goes into ~/.bash_profile. Then check:

claude --version

However, an already open terminal window retains the old PATH. Open a new one. A terminal integrated into an editor inherits its PATH from the editor: quit and restart it. The commands for Windows, in PowerShell and CMD, can be found in the "Verify your PATH" section of the troubleshooting page.

Login fails

Finally, when logging in fails for no clear reason, the documentation recommends a clean re-authentication: type /logout, close Claude Code, relaunch claude, and sign in again. If no browser opens, for example in WSL2, via SSH, or inside a container, press c at the login prompt to copy the URL, then paste it into a browser.

What's next: learning to use it effectively

Installing the tool takes ten minutes. However, knowing how to entrust it with real work takes practice: framing a request, reviewing what it produces, and staying in control of the outcome. Therefore, the most useful approach is to start with a small project of your own, ask it questions about the code, and then ask for a limited change that you review before accepting.

At ILLITH, Claude Code is part of the curriculum for the AI Project Manager and vibe coding bootcamp, where it is used with Cursor and GitHub to build, stabilize, and deploy a product. The complete catalog is available on the training programs page. Furthermore, if you first have a financing question, the financing page details the options based on your situation.

Finally, to continue independently, move on to the article on Claude Code skills. And to see the first tasks step by step, the official quickstart walks through an initial exchange and a first code change.

Frequently Asked Questions

How do I install Claude Code on Mac?

Open Terminal and run curl -fsSL https://claude.ai/install.sh | bash. Once the installation is complete, open a new terminal and type claude --version to verify. The official documentation requires macOS 13.0 or newer. Homebrew is an alternative with brew install --cask claude-code, without automatic updates.

How do I install Claude Code on Windows?

In PowerShell, run irm https://claude.ai/install.ps1 | iex. In CMD, use the curl command provided in the documentation, which downloads install.cmd. You can also use WSL by running the Linux command in the WSL terminal. Administrator privileges are not required, and Git for Windows remains optional.

Do I need to install Node.js to use Claude Code?

Not for the recommended native installation, which requires neither Node.js nor a version manager. Node.js 22 or newer is only required if you install Claude Code via npm using npm install -g @anthropic-ai/claude-code. The documentation advises against using sudo with this command, as it prevents automatic updates.

Is Claude Code free?

No. According to the official documentation, Claude Code requires a Pro, Max, Ultra, Team, or Enterprise subscription, or a Console account, and the free plan on claude.ai does not provide access. Pricing may change: check the Claude pricing page before selecting a plan.

How do I update Claude Code?

A native installation updates itself automatically in the background. To force an update, run claude update. With Homebrew, use brew upgrade claude-code, and with WinGet, winget upgrade Anthropic.ClaudeCode. The claude doctor command displays the installation status and the result of the last update attempt.

What is the difference between Claude Code and Claude Desktop on Linux?

Claude Code is the command-line tool, installed via curl or a package manager. Claude Desktop is a desktop application combining Chat, Cowork, and Claude Code. On Linux, it is in beta and requires Ubuntu 22.04 or higher, or Debian 12 or higher. On Fedora or Arch, the documentation points users to the CLI.

Antoine Vigneau
Antoine Vigneau
ILLITH Teaching Team

Blog articles are written by the ILLITH teaching team.

Read next

Newsletter

Boost your No-Code and AI learning journey

Get weekly insights, tools, and pro tips straight from the ILLITH team.

One-click unsubscribe. No spam, guaranteed.

Video testimonial

Book a call to discuss your project

Book an appointment