AIEN

How to Install Claude Code (macOS, Windows, Linux)

German Bragin··9 min read

To install Claude Code on macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash, then type claude in your project folder and log in. You need macOS 13+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+, 4 GB of RAM, internet access, and a paid Claude plan or Console account.

Checked against the official Claude Code documentation on December 2, 2026. Versions and menus change often, so if something differs on your screen, the official setup page wins.

Requirements

According to Anthropic’s documentation, Claude Code runs on:

  • Operating system: macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+.
  • Hardware: 4 GB+ RAM, x64 or ARM64 processor.
  • Network: an internet connection is required.
  • Shell: Bash, Zsh, PowerShell or CMD.
  • Location: a country on Anthropic’s supported countries list.

Account: Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account. The free claude.ai plan does not include Claude Code. You can also use it through Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry. For plan costs, see Claude Code pricing.

Node.js is not required for the recommended native install. It is only needed (version 22 or later) if you choose the npm method. Git is optional, though on native Windows it is recommended.

Install on macOS, Linux and WSL

Open a terminal and run the native installer:

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

The docs note that the command shows no progress while it downloads. When it finishes, open a new terminal window and check the result:

claude --version

A working install prints a version number followed by (Claude Code). For a more detailed check, run:

claude doctor

claude doctor prints read-only diagnostics about the install and your settings without starting a session.

Other methods from the documentation:

# Homebrew (stable channel)
brew install --cask claude-code

# npm (needs Node.js 22+; do not use sudo)
npm install -g @anthropic-ai/claude-code@latest

Homebrew has two casks: claude-code follows the stable channel (typically about a week behind), and claude-code@latest gets releases as soon as they ship. Homebrew installs do not auto-update; run brew upgrade claude-code yourself. The docs also list apt, dnf and apk repositories for Debian/Ubuntu, Fedora/RHEL and Alpine.

Alpine: the installer needs bash and curl, which Alpine does not include by default:

apk add bash curl

Native installs update themselves in the background. To update right away, run claude update.

Install on Windows

You can run Claude Code natively on Windows or inside WSL. Native installs do not need Administrator rights.

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

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

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

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

WinGet:

winget install Anthropic.ClaudeCode

WinGet installs do not auto-update; run winget upgrade Anthropic.ClaudeCode from time to time.

The docs list two common mix-ups. If you see The token '&&' is not a valid statement separator, you are in PowerShell and used the CMD command. If you see 'irm' is not recognized as an internal or external command, you are in CMD and used the PowerShell command.

Git for Windows is optional but recommended. With it, Claude Code uses Git Bash for its Bash tool. Without it, Claude Code uses PowerShell as the shell tool.

WSL: open your WSL distribution and run the Linux command above inside that terminal. Per the docs, WSL 2 supports sandboxing, while native Windows and WSL 1 do not.

First run and login

Go to a project folder and start Claude Code:

cd /path/to/your/project
claude

On first use it prompts you to log in. For Claude subscription or Console accounts, you complete authentication in your browser. If you have set the ANTHROPIC_API_KEY environment variable and you approve the key when Claude Code asks, it skips the login prompt.

The documented account options are:

  • Claude Pro, Max, Ultra, Team or Enterprise (recommended by Anthropic).
  • Claude Console (API access with pre-paid credits).
  • Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry.
  • A self-hosted Claude apps gateway, if your organization runs one.

To switch accounts or sign in again, type /login inside a running session.

Then try the questions the quickstart suggests:

what does this project do?
explain the folder structure

Claude reads project files as needed, so you do not have to paste context in. For a first edit, the quickstart suggests something small, such as add a hello world function to the main file. Claude shows the change and may ask for approval. Press Shift+Tab to switch the permission mode of the current session.

Use it in VS Code, JetBrains and the desktop app

The terminal is one of several interfaces. The quickstart lists the web, the desktop app, VS Code, JetBrains IDEs and CI/CD (GitHub Actions and GitLab).

VS Code

  • Requires VS Code 1.94.0 or later and a paid Claude plan or Console account. No API key is required; you sign in the first time you open the panel.
  • Extension name: Claude Code, publisher ID anthropic.claude-code. Install it from the Extensions view (Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on Mac) or from the Visual Studio Marketplace or Open VSX.
  • Cursor has its own install link, cursor:extension/anthropic.claude-code.
  • Open the panel with the Spark icon in the editor toolbar or activity bar, the status bar item, or the Command Palette (search “Claude Code”).

One detail trips people up: the extension bundles its own copy of the CLI for the chat panel, but installing it does not put claude on your PATH. If you want to run claude in VS Code’s integrated terminal, install the standalone CLI as above. The extension and the CLI share conversation history, and plugins and MCP servers configured in one are available in the other.

JetBrains

The docs have a separate JetBrains page: see the JetBrains guide. I did not verify its steps for this article.

Desktop app

The desktop app gives you Claude Code through a graphical interface, with no terminal needed. Download it for macOS or Windows, or follow the separate guide for Linux (beta). Sign in with your Anthropic account and open the Code tab at the top of the sidebar. The docs say the desktop app includes Claude Code, so you do not need Node.js or the CLI for that tab. A paid plan (Pro, Max, Ultra, Team or Enterprise) is required.

If you also want claude in a terminal, install the CLI separately. Choosing between Claude Code and an editor-based tool is a different question; see Claude Code vs Cursor.

Core commands

From the quickstart, run these in your shell:

Command What it does
claude Start interactive mode
claude "fix the build error" Start interactive mode with an initial prompt
claude -p "explain this function" Run a one-off query, then exit
claude -c Continue the most recent conversation in the current directory
claude -r Resume a previous conversation

Inside a session:

Command What it does
/help Show available commands
/clear Start a new conversation (resume the old one with /resume)
/login Switch accounts or re-authenticate
/exit or Ctrl+D twice Exit

Typing / shows the commands and skills available to you. The CLI reference has the full list of shell commands.

Skills and CLAUDE.md

Two features make Claude Code fit your own project. Both are covered in the docs.

CLAUDE.md holds persistent instructions: build and test commands, coding standards, conventions. A project file lives at ./CLAUDE.md or ./.claude/CLAUDE.md and is shared through version control. A personal file for all your projects lives at ~/.claude/CLAUDE.md. Run /init inside a session to generate a starting file; Claude analyzes the codebase and writes the commands and conventions it finds. If a file already exists, /init suggests improvements instead of overwriting it.

Skills are SKILL.md files with instructions Claude loads when they are relevant, or when you call them with /skill-name. Unlike CLAUDE.md, a skill’s body loads only when used.

Scope Path
Personal ~/.claude/skills/<skill-name>/SKILL.md
Project .claude/skills/<skill-name>/SKILL.md

The documentation’s minimal example:

---
name: api-conventions
description: API design patterns for this codebase
---

When writing API endpoints:
- Use RESTful naming conventions
- Return consistent error formats
- Include request validation

The name becomes the command (/api-conventions) and defaults to the folder name. The description tells Claude when to use the skill and is the only recommended field.

Common problems

These come from Anthropic’s installation troubleshooting page.

command not found: claude or 'claude' is not recognized. The install directory is not on your PATH. The installer puts claude at ~/.local/bin/claude on macOS/Linux, or %USERPROFILE%\.local\bin\claude.exe on Windows. On macOS or Linux with Zsh, add it like this (use ~/.bashrc for Bash):

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

On Windows PowerShell:

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

Then open a new terminal.

Installed only the VS Code extension, but claude is missing. The extension does not add claude to PATH. Run the standalone install.

syntax error near unexpected token '<' or a 403 from the installer. The docs treat both as the “install script returns HTML” case and point to the troubleshooting page for the fix and alternative install methods. I have not repeated those steps here.

cannot execute binary file: Exec format error in WSL. You are probably on WSL 1, which has a known native-binary regression. The documented fix is converting the distribution to WSL 2 from PowerShell: wsl --set-version <DistroName> 2.

Several installs at once. If claude behaves unexpectedly after you tried more than one method, keep one install (the native one is recommended) and remove the extras.

FAQ

Is there a Claude Code download for desktop? Yes. The Claude desktop app has a Code tab and downloads for macOS and Windows, plus a Linux beta. The terminal version installs with the commands above.

Is Claude Code free? The documentation says the free claude.ai plan does not include Claude Code. You need Pro, Max, Ultra, Team, Enterprise or a Console account, or access via a supported cloud provider. See Claude Code pricing.

Do I need Node.js? Not for the native installer, Homebrew or WinGet. Node.js 22 or later is needed only for the npm package.

Does Claude Code work on Windows without WSL? Yes. It runs natively from PowerShell or CMD. WSL 2 adds sandboxing support, which native Windows lacks, according to the docs.

How do I update it? Native installs update in the background; claude update applies an update now. Homebrew, WinGet and Linux package manager installs need manual upgrades.

Can I use Claude Code if I never used a terminal? Anthropic has a terminal guide for that, and the desktop app avoids the terminal altogether.

Summary

Installation is one command for your system, then claude --version to confirm and claude in a project folder to log in. After that, the useful next steps are the VS Code extension or desktop app if you prefer a graphical interface, /init to create a CLAUDE.md, and a skill for any task you repeat. If you want a structured path, my Vibe Coding course covers building with AI coding tools, and more guides are in the blog.

About the author

German Bragin works on SEO, marketing and development with AI, and teaches the Vibe Coding and Vibe Marketing courses. If you want help setting up Claude Code for your team or project, see services.

German Bragin · SEO specialist and marketer

SEO, marketing automation and AI-assisted development. Ten years at the intersection of tech and internet marketing: I teach builders how to get their first customers.

Let's work together.

Write a few lines about your goal and what you want to buy: a course, a consultation or a project. I answer by email or messenger.