Installing Claude Code on Windows, Mac, and Linux

To install Claude Code, run Anthropic's official command in a terminal: 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. Then verify with claude --version, and type claude to sign in. You need a paid Claude subscription or a Console account: the free plan does not include Claude Code.
Claude Code installs with a single command on Windows, macOS, and Linux, but the details vary from one system to another: PowerShell or CMD, WSL, Homebrew, Linux repositories, PATH fixes. This guide gives you the official commands as of November 18, 2026, how to verify that everything works, the most common errors, and finally how to connect it to a local model with Ollama.
#How do you install Claude Code? Requirements and official commands
Claude Code installs with a single official 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 native script is the method Anthropic recommends, because it updates itself automatically in the background.
Claude Code is Anthropic's coding agent: a program you use in the terminal that reads a project's code, edits files, and runs commands once you approve. The program installs on your machine, but the AI model runs on Anthropic's servers: according to the official documentation as of November 18, 2026, an internet connection is required.
| System | Method | Commande | Automatic updates |
|---|---|---|---|
| macOS, Linux, WSL | Native script (recommended) | curl -fsSL https://claude.ai/install.sh | bash | Yes, in the background |
| Windows (PowerShell) | Native script (recommended) | irm https://claude.ai/install.ps1 | iex | Yes, in the background |
| Windows (CMD) | Native script | curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd | Yes, in the background |
| macOS | Homebrew | brew install --cask claude-code | Not by default: brew upgrade claude-code |
| Windows | WinGet | winget install Anthropic.ClaudeCode | Not by default: winget upgrade Anthropic.ClaudeCode |
| Debian, Ubuntu, Fedora, RHEL, Alpine | Signed apt, dnf, and apk repositories | See the official documentation | No: system update |
| All (Node.js 22 or later) | npm | npm install -g @anthropic-ai/claude-code@latest | Depending on npm folder permissions |
#Requirements
Benefit from our experience and a guided path to choose the right tools for your Mac and use your AI every day.
- Lifetime online access
- PDF + files
- Refunded within 30 days
- System
- macOS 13.0 or later, Windows 10 1809 or later (or Windows Server 2019), Ubuntu 20.04 or later, Debian 10 or later, Alpine Linux 3.19 or later.
- Hardware
- At least 4 GB of RAM and an x64 or ARM64 processor. No graphics card is needed, since the Claude model runs remotely.
- Compte
- A Claude Pro, Max, Ultra, Team, or Enterprise subscription, or a pay-as-you-go Claude Console account. The free claude.ai plan does not include Claude Code.
- Country
- Claude Code is only available from countries supported by Anthropic; France is one of them.
On pricing, Anthropic's official page, checked on November 18, 2026, lists the Pro plan at $20 per month with monthly billing, and states that Claude Code is included in all paid plans, with the same usage limits as the rest of the subscription. Plan details and free alternatives are covered in the dedicated guide to Claude Code pricing.
#Install Claude Code on Windows: PowerShell, CMD, or WSL
On Windows, Claude Code installs from PowerShell with irm https://claude.ai/install.ps1 | iex, without administrator rights. Alternatively, you can install it in WSL 2, the Windows Subsystem for Linux, using the Linux command: it's the only Windows setup where the command sandbox is supported.
- 01Open PowerShellOpen the Start menu, type PowerShell, and launch it normally, without “Run as administrator.” The prompt starts with PS C:\Users\VotreNom>, which confirms you're in PowerShell and not in the CMD command prompt.
- 02Run the install scriptPaste the command irm https://claude.ai/install.ps1 | iex and press Enter. The script downloads Claude Code without showing a progress bar: wait for the prompt to return before doing anything else.
- 03Open a new terminalClose the PowerShell window and open a new one so the install folder is picked up. The program is installed at %USERPROFILE%\.local\bin\claude.exe.
- 04Check the versionType claude --version. A successful installation displays a version number followed by (Claude Code). If Windows says claude is not recognized, apply the PATH fix described below.
- 05Install Git for Windows (recommended)Git for Windows is optional but recommended by Anthropic: it provides Git Bash, which Claude Code uses to run its commands. Without it, Claude Code falls back to PowerShell. An installation in WSL doesn't need it.
#Installing Claude Code on Mac: native script or Homebrew
On a Mac, you install Claude Code by opening the Terminal app and running curl -fsSL https://claude.ai/install.sh | bash. It requires macOS 13.0 or later; both Apple Silicon Macs (ARM64) and Intel Macs (x64) are supported. Homebrew is an alternative, but without automatic updates.
Homebrew offers two Claude Code packages. The claude-code package follows the stable channel, which is generally about one week behind and skips releases with major regressions. The claude-code@latest package gets every release as soon as it ships. By default, you update via Homebrew manually with brew upgrade claude-code, or brew upgrade claude-code@latest for the second package. To have Claude Code run this Homebrew or WinGet update itself, Anthropic's documentation says to set the CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE environment variable to 1.
The native script puts the launcher in ~/.local/bin/claude. If Terminal responds with "command not found: claude", that directory isn't in your shell's PATH yet: the fix is in the troubleshooting section.
#Installing Claude Code on Linux: script, apt, dnf, or Alpine
On Linux, Claude Code installs with the same script as on Mac: curl -fsSL https://claude.ai/install.sh | bash, without sudo. Anthropic also publishes signed apt (Debian, Ubuntu), dnf (Fedora, RHEL), and apk (Alpine) repositories for machines where software has to go through the package manager.
Alpine Linux and other musl-based distributions don't include bash or curl by default. Without them, the install script fails with a "not found" error. Install those two packages first, then rerun the install command.
The apt, dnf, and apk repositories each offer a stable channel and a latest channel. Setting them up takes several commands, including verifying the fingerprint of Anthropic's signing key: follow them directly on the advanced installation page of the official documentation, linked at the end of this guide. These installations update along with the system, for example sudo apt update && sudo apt upgrade claude-code.
#How do you check that Claude Code is installed correctly?
To verify your Claude Code installation, open a new terminal and type claude --version: a version number should appear. As of November 18, 2026, the latest version at the top of the official changelog is 2.1.327, while the stable channel distributes 2.1.311 according to the npm registry. So an older number isn't necessarily an error: the claude-code Homebrew package and the Linux repositories configured by default follow this stable channel. The claude doctor command then gives you a full diagnostic.
The claude doctor command shows, without opening a session, the installation status, errors in settings files, and warnings with a suggested fix. It's the first thing to try when Claude Code behaves oddly after an install or update.
- 01Open a projectIn the terminal, go to the folder of the project you want to work on using the cd command followed by the folder path. Claude Code works on the files in the folder where it is launched.
- 02Launch Claude CodeType claude. On first launch, Claude Code opens your browser so you can sign in with your Claude account (Pro, Max, Ultra, Team, Enterprise) or your Console account. If the browser shows a code instead of returning to the terminal, paste that code into the terminal.
- 03Ask a first questionOnce you're signed in, the Claude Code prompt shows the version, the model, and the working directory. Try asking something like "what does this project do?" Your credentials are saved, so you won't be asked to sign in again on later launches.
- 04Prepare the projectType /init to have Claude Code analyze the codebase and generate a starter CLAUDE.md file with the project's build and test commands and conventions. Type /help for the list of commands and /config for settings.
#Updating or uninstalling Claude Code
A native install of Claude Code updates itself at startup and in the background; the claude update command applies the latest version right away. For a native install on macOS, Linux, or WSL, uninstalling means deleting the launcher and the versions folder.
#Claude Code not found or installation blocked: common errors
The most common error after installing Claude Code is "command not found: claude" or "'claude' is not recognized": the program is installed correctly, but its folder, ~/.local/bin on Mac and Linux or %USERPROFILE%\.local\bin on Windows, isn't in your PATH. The installer flags this in its "Setup notes" but doesn't fix the PATH itself.
| Displayed message | Cause | Patch |
|---|---|---|
| command not found: claude / 'claude' is not recognized | Install folder missing from PATH | Add ~/.local/bin (or %USERPROFILE%\.local\bin) to your PATH, then open a new terminal |
| The token '&&' is not a valid statement separator | CMD command pasted into PowerShell | Use the PowerShell command |
| 'irm' is not recognized as an internal or external command | PowerShell command pasted into CMD | Use the CMD command |
| curl: (22) The requested URL returned error: 403 | Proxy or network filter, or unsupported country | Check the company network or proxy |
| App unavailable in region | Country not supported by Anthropic | Claude Code isn't available in this country |
| not found on Alpine | bash ou curl absents | apk add bash curl |
The zsh fix applies to macOS, where zsh is the default shell. On Linux with bash, add the same export line to ~/.bashrc; on a Mac with bash, it goes in ~/.bash_profile, because the macOS Terminal launches bash as a login shell, which ignores ~/.bashrc. A terminal opened before the fix keeps the old PATH, and a terminal built into an editor such as VS Code inherits the editor's PATH: close and reopen the window, or the editor, before testing claude --version again.
#How do you connect Claude Code to VS Code?
To use Claude Code in VS Code, install Anthropic's official Claude Code extension: open the Extensions view with Cmd+Shift+X on Mac or Ctrl+Shift+X on Windows and Linux, search for "Claude Code," and click Install. You need VS Code 1.94.0 or later and a paid Claude account or a Console account.
The Claude Code VS Code extension bundles its own copy of the program for its chat panel, but doesn't add it to your PATH. To type claude in VS Code's integrated terminal, you still need the standalone installation described above. The extension also installs in Cursor and other VS Code-based editors through the Open VSX registry.
#Connecting Claude Code to a local model with Ollama
Claude Code can work with a local model through Ollama, which exposes an Anthropic-compatible API. Once Claude Code and Ollama are installed, the ollama launch claude command starts Claude Code connected to Ollama. The Ollama documentation recommends a local model configured with a context of 64k tokens or more.
Ollama's documentation also describes a manual setup using environment variables, which points Claude Code to the local Ollama server on port 11434. The official example uses the qwen3.5 model, whose default tag in the Ollama library corresponds to the 9B version, at 6.6 to 7.6 GB; a model must support tool calling for Claude Code to be able to read and edit files.
Is Claude Code free?+
Do you need Node.js to install Claude Code?+
Do you need administrator rights to install Claude Code on Windows?+
How do you install a plugin in Claude Code?+
How should you configure Claude Code after installing it?+
Does Claude Code work offline?+
How do you update Claude Code?+
#Sources and verification as of November 18, 2026
The commands, requirements, versions, and prices in this guide were collected on November 18, 2026, from the official Claude Code documentation, Anthropic's pricing page, the changelog in Anthropic's GitHub repository, and the Ollama documentation; commands and prices change often, so verify them before an enterprise deployment.
- Source: Claude Code advanced installation (Anthropic)
- Source: Claude Code quickstart (Anthropic)
- Source: installation troubleshooting (Anthropic)
- Source: VS Code extension (Anthropic)
- Source: Claude plan pricing (Anthropic)
- Source: Claude Code changelog (GitHub, Anthropic)
- Source: Claude Code with Ollama (Ollama documentation)
Feedback, an error, or a clarification? Let us know—it improves the guide for everyone.