The full guide
Install Claude Code, step by step
Claude Code is one native program, claude, that runs in a terminal. The installer puts it in your home folder, so it needs no administrator rights, and it keeps itself up to date. Everything else on this page is a variation on that: a package manager instead of the script, an editor instead of a terminal, a cloud account instead of a plan.
What the installer does
On macOS and Linux the native installer puts the program under ~/.local/share/claude/versions/ and a launcher at ~/.local/bin/claude; on Windows the launcher is %USERPROFILE%\.local\bin\claude.exe. That folder has to be on your PATH. If claude is not found after the install, open a new terminal first: the one you installed from still has the old PATH.
Claude Code checks for updates when it starts and while it runs, downloads them in the background and switches to them the next time you start it. It keeps the two newest versions and deletes older ones. claude update installs an update now; claude doctor shows the result of the last attempt.
Latest or stable
There are two release channels. latest, the default, gets each release as it ships. stable is typically about a week old and skips releases with major regressions. Choose one in /config, or set autoUpdatesChannel in settings.json. Homebrew picks the channel by cask name instead: claude-code follows stable, claude-code@latest follows latest. A newly launched model can need a version newer than stable serves.
To install on the stable channel from the start, in a terminal on macOS, Linux or WSL, then in Windows PowerShell:
$ curl -fsSL https://claude.ai/install.sh | bash -s stable
PS> & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable
Windows: which shell Claude Code uses
Claude Code runs on Windows without WSL. Without Git for Windows it runs shell commands through PowerShell. With Git for Windows installed it uses Git Bash for its Bash tool, and PowerShell stays available alongside. If Git is installed but Claude Code cannot find it, set CLAUDE_CODE_GIT_BASH_PATH in the env block of settings.json to the full path of bash.exe. Claude Code needs a 64-bit Windows.
Inside WSL it is the Linux program: install and start it in the WSL terminal. Keep projects on the Linux file system (/home/), not under /mnt/c/: search across the two file systems is slower and can return fewer matches.
Linux package repositories
Anthropic publishes signed apt, dnf and apk repositories for Debian, Ubuntu, Fedora, RHEL and Alpine, each with a stable and a latest channel. They update through your normal system upgrade, not through Claude Code. The commands, which add a signing key and a repository file, are on Anthropic's setup page. Distribution by distribution, with Arch, PATH fixes and a desktop app, see Claude Code on Linux.
Updating and removing it
| Installed with | Update | Uninstall |
|---|---|---|
| Native installer | automatic, or claude update | delete ~/.local/bin/claude and ~/.local/share/claude |
| Homebrew | brew upgrade claude-code | brew uninstall --cask claude-code |
| WinGet | winget upgrade Anthropic.ClaudeCode | winget uninstall Anthropic.ClaudeCode |
| npm | npm install -g @anthropic-ai/claude-code@latest | npm uninstall -g @anthropic-ai/claude-code |
Uninstalling leaves your settings, MCP servers and session history in ~/.claude and ~/.claude.json. Delete those too only if you want them gone: it cannot be undone. The VS Code extension, the JetBrains plugin and the Desktop app also write there, so remove them first or the folder comes back.
Where your sessions go
Claude Code writes every session to ~/.claude/projects/ as JSON lines, with the tokens of every call, and deletes them after 30 days by default. That record is what Caprock and other usage tools read: see how to check Claude Code usage for the ways to see it, and Claude Code pricing for what each plan includes.
Questions people ask
- Is Claude Code free?
- Installing it is free, but using it needs a paid account: Pro, Max, Team, Enterprise, or a Claude Console account billed per token. The free claude.ai plan does not include Claude Code.
- Does Claude Code work on Windows?
- Yes, on Windows 10 1809 or later, natively or inside WSL. Install it from PowerShell with irm https://claude.ai/install.ps1 | iex; Git for Windows is optional and gives it Git Bash.
- Do I need Node.js to install Claude Code?
- No. The native installer, Homebrew, WinGet and the Linux package repositories need no Node.js. Only the npm install does, Node.js 22 or later, and even then the installed program does not use Node.js.
- How do I update Claude Code?
- The native install updates itself in the background; claude update applies an update now. Homebrew and WinGet installs need brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
- How do I uninstall Claude Code?
- For the native install, delete ~/.local/bin/claude and ~/.local/share/claude. Otherwise use brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code. Your settings and history stay in ~/.claude until you delete it.
- Do I need the CLI for the VS Code extension?
- Not for its chat panel: the extension bundles its own copy. To run claude in the editor's terminal, or to use the JetBrains plugin, install the CLI too.
Sources
- Claude Code docs — Advanced setup (requirements, install, update, uninstall), read 3 October 2026
- Claude Code docs — Quickstart, read 3 October 2026
- Claude Code docs — Troubleshoot installation and login, read 3 October 2026
- Claude Code docs — Troubleshooting, read 3 October 2026
- Claude Code docs — Authentication, read 3 October 2026
- Claude Code docs — Use Claude Code in VS Code, read 3 October 2026
- Claude Code docs — JetBrains IDEs, read 3 October 2026
- Claude Code docs — Commands (/status, /doctor), read 3 October 2026
- Claude Code docs — Settings reference (cleanupPeriodDays), read 3 October 2026
- Claude plans and prices, read 3 October 2026
- Caprock README
Try it
The record of every coding agent you run, the sessions it did not start included. Free, open source; nothing leaves your machine.
Notarized by Apple. One file for Apple silicon and Intel, macOS 13 or later.
Or run it yourself:
Paste in Terminal: it installs Caprock and opens it.Or with Homebrew: brew install --cask dspv/tap/caprock-app