How to Install Claude Code

Install Claude Code on macOS, Linux or WSL with `curl -fsSL https://claude.ai/install.sh | bash`, or on Windows PowerShell with `irm https://claude.ai/install.ps1 | iex`, then run `claude` in a project folder and sign in with a paid Claude plan or a Console account.

To install Claude Code on macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash in a terminal; on Windows, run irm https://claude.ai/install.ps1 | iex in PowerShell (Advanced setup). Then open a new terminal, go to a project folder, type claude and sign in. These native installers are Anthropic's recommended method: they need no Node.js and they update themselves in the background. Homebrew, WinGet, apt, dnf, apk and npm also work, but most of them do not update on their own. Claude Code needs a Pro, Max, Ultra, Team or Enterprise plan or a Claude Console account; the free Claude plan does not include it (Advanced setup).

Quick facts

macOS, Linux, WSL curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell irm https://claude.ai/install.ps1 | iex
Windows CMD curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Homebrew brew install --cask claude-code
WinGet winget install Anthropic.ClaudeCode
npm npm install -g @anthropic-ai/claude-code (Node.js 22 or later)
Check the install claude --version, then claude doctor
Systems macOS 13.0+, Windows 10 1809+ or Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine 3.19+
Hardware 4 GB of memory or more, x64 or ARM64
Latest version 2.1.318, Nov 4, 2026 (as of Nov 6, 2026)

Source: Advanced setup, Claude Code Docs, and Releases, GitHub, read Nov 6, 2026.

Before you install

Claude Code runs on macOS 13.0 or later, Windows 10 version 1809 or later, Windows Server 2019 or later, Ubuntu 20.04 or later, Debian 10 or later and Alpine Linux 3.19 or later, on x64 or ARM64 with at least 4 GB of memory, an internet connection and a shell (Bash, Zsh, PowerShell or CMD) (Advanced setup). You also need to be in a country Anthropic supports. Git is optional but recommended, since Claude Code uses it for commits, worktrees and sending a local repository to a cloud session.

You need an account that includes Claude Code: Claude Pro, Claude Max, Claude Ultra, a Team or Enterprise seat, or a Claude Console account paid per token (Authentication). Prices are on Claude Code Pricing.

How do I install Claude Code on Mac or Linux?

  1. Open Terminal (or any shell).
  2. Run the installer:
curl -fsSL https://claude.ai/install.sh | bash
  1. Wait: the installer shows no progress while it downloads.
  2. Open a new terminal window and check it with claude --version, which prints a line such as 2.1.318 (Claude Code).

The installer puts the launcher at ~/.local/bin/claude, linked to a versioned copy under ~/.local/share/claude/versions/ (Advanced setup). If the shell then says claude: command not found, ~/.local/bin is not on your PATH; add it in your shell profile and open a new terminal.

Homebrew users can run brew install --cask claude-code instead. That cask follows the stable channel, about a week behind the newest release and skipping releases with major regressions; claude-code@latest follows the latest one. Homebrew does not update Claude Code by itself: run brew upgrade claude-code.

On Linux, Anthropic also publishes signed apt, dnf and apk repositories, so after adding the repository the install is sudo apt install claude-code, sudo dnf install claude-code or apk add claude-code, and updates arrive with the normal system upgrade. Alpine and other musl systems also need apk add bash curl libgcc libstdc++ ripgrep and the environment variable USE_BUILTIN_RIPGREP=0 (Advanced setup).

How do I install Claude Code on Windows?

Claude Code runs natively on Windows or inside WSL, and native Windows needs no administrator rights (Advanced setup).

  1. Open PowerShell (not CMD).
  2. Run:
irm https://claude.ai/install.ps1 | iex
  1. Open a new PowerShell window and run claude --version.

From the older Command Prompt, use curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd. The two shells are easy to mix up: "The token '&&' is not a valid statement separator" means you pasted the CMD line into PowerShell, and "'irm' is not recognized" means you pasted the PowerShell line into CMD. WinGet works too: winget install Anthropic.ClaudeCode, updated with winget upgrade Anthropic.ClaudeCode.

Git for Windows is optional. With it, Claude Code runs commands through Git Bash; without it, it uses its PowerShell tool, the fallback added in the week of Apr 27, 2026. Native Windows has no sandboxing for commands; for that, install Claude Code inside WSL 2 with the Linux command (WSL 1 has no sandbox either).

Can I install Claude Code with npm?

Yes, but it is no longer the main method. Run npm install -g @anthropic-ai/claude-code with Node.js 22 or later; the package downloads the same native binary for your platform, so an older Node prints an EBADENGINE warning but still works. Never use sudo npm install -g, which causes permission problems. To update, run npm install -g @anthropic-ai/claude-code@latest, not npm update -g.

Sign in and first run

  1. Open a terminal in your project folder and type claude.
  2. A browser opens to sign in. If it does not, press c to copy the sign-in link and open it yourself; if the browser shows a code, paste it where Claude Code asks.
  3. Choose a Claude subscription account, or a Console account for API billing. When the terminal prints Login successful, you are in.
  4. Trust the folder when asked, then describe a task, or type /init so Claude writes a CLAUDE.md describing the project (CLAUDE.md and Memory).

Sources: Authentication, Quickstart, read Nov 6, 2026.

A common trap: if ANTHROPIC_API_KEY is set in your environment, Claude Code uses that key (once you approve it) even when you are signed in with a subscription, and bills the API. Run unset ANTHROPIC_API_KEY and check /status to see which account is active (Authentication). /login switches accounts and /logout signs out. Credentials are stored in the macOS Keychain, or in ~/.claude/.credentials.json on Linux and Windows. Companies on Amazon Bedrock, Google Cloud or Microsoft Foundry set an environment variable such as CLAUDE_CODE_USE_BEDROCK=1 or run /setup-bedrock instead of signing in (Claude on Cloud Platforms).

Updating Claude Code

The native install checks for updates in the background and installs them on its own; claude update updates at once, and /restart inside a session applies a downloaded update (Advanced setup). The setting autoUpdatesChannel chooses "latest" (the default) or "stable", which is typically about a week old. A new model can need a newer version than the stable channel offers: Claude Opus 5.5, for example, needs version 2.1.280 or later. DISABLE_AUTOUPDATER=1 stops the background check. Homebrew, WinGet and npm installs must be updated with their own commands, unless CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 is set.

Uninstalling Claude Code

Remove it with the tool that installed it: brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code (Advanced setup). A native install lives in ~/.local/bin/claude and ~/.local/share/claude/, which can be deleted. Settings, memory and session history stay in ~/.claude/ and ~/.claude.json; delete those only to remove everything, and remember that the VS Code extension, the JetBrains plugin and the desktop app use ~/.claude/ too.

Troubleshooting

Run claude doctor in the shell for a read-only check of the installation, or /doctor inside a session for a fuller checkup that offers fixes (Advanced setup, Commands). The usual problems are a PATH missing ~/.local/bin, two installs side by side (an old npm copy shadowing the native one: which -a claude shows both), and a corporate proxy blocking the download, fixed by setting HTTPS_PROXY and HTTP_PROXY before running the installer (Troubleshoot installation and login). For the IDE extensions and the desktop app, which install separately, see Claude Code in VS Code and JetBrains and Claude Code Desktop.

Frequently asked questions

Does Claude Code need Node.js? No. The native Claude Code installer and the Homebrew, WinGet and Linux packages need no Node.js; only the npm install does, with Node.js 22 or later.

Can I install Claude Code without admin rights? Yes. The native Claude Code installer writes to your home folder, so it needs no administrator or root access on Windows, macOS or Linux.

Is Claude Code free to install? Claude Code is free to download, but it only runs with a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Console account billed per token.

How do I update Claude Code? A native Claude Code install updates itself in the background; run claude update to update at once, or the upgrade command of Homebrew, WinGet or npm if you used one of those.

Does Claude Code work in WSL? Yes. Install Claude Code inside the WSL distribution with the Linux curl command; WSL 2 also supports sandboxing, which native Windows does not.

Do I need to install the CLI to use the VS Code extension? No. The Claude Code VS Code extension bundles its own copy, but it does not put claude on your PATH, so install the CLI separately to use it in a terminal; the JetBrains plugin does need the CLI.

Sources

Moments

Installing Claude Code

Claude

  1. To install Claude Code on macOS, Linux or WSL, run curl -fsSL https://claude.ai/install.sh | bash in a terminal; on…
  2. From the older Command Prompt, use curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del…

See also

About this page

Last updated Nov 6, 2026 by the Vi.ki team. Page text CC BY-SA 4.0.

Edit History

Hotkeys

/
Jump to the search box
? or Ctrl + /
Open this list
Esc
Close this list, the photo viewer, or the account menu

Video

Space or K
Play or pause
← →
Back or forward 5 seconds
J L
Back or forward 10 seconds
0 to 9
Go to 0% to 90% of the video
, .
Previous or next frame, while paused
M
Mute or unmute
C
Captions on or off
F
Full screen on or off
A D
Previous or next moment

Photo viewer

← → or A D
Previous or next photo
↑ ↓ or W S
Previous or next photo
Home End
First or last photo
I
Show or hide the photo's info
Z
Clickless on or off: a pointer over a thumbnail shows it
N
Compare with the last photo: back to the one shown before this, and N again comes back
Q
Move the thumbnails to the next edge: top, bottom, left and round
, or Ctrl + ,
Open or close the viewer's settings
V
Clickless pan: a zoomed photo follows the pointer, rather than being dragged
Shift
Browse on or off
B
Show or hide the button bar
T
Show or hide the thumbnails
1
100% zoom on or off
0
Rate the photo as no opinion; again takes the answer back
+ -
Rate the photo a step higher or lower
F
Full screen: the photo alone. F again puts everything back.
Back to top