Official Docs Breakdown: Set Up Claude Code
💬 hippo: This is the fourth post in the series. Installation looks simple on the surface, but a few key choices matter right away: native installer or npm? Which update channel should you use? This guide helps you make the right call.
1. What This Page Covers
This page is the installation manual for Claude Code, covering the full lifecycle: system requirements, installation, verification, updates, and uninstallation. The single most important takeaway: use the Native Install, not npm. Native installation is faster, has zero runtime dependencies, and supports background auto-updates. The npm method is deprecated.
2. Official Guide Breakdown
2.1 System Requirements and Installation Methods
System requirements at a glance:
| Category | Requirement |
|---|---|
| OS | macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine 3.19+ |
| Hardware | 4 GB+ RAM, x64 or ARM64 processor |
| Network | Internet connection required (Anthropic-supported countries/regions) |
| Shell | Bash, Zsh, PowerShell, or CMD |
Native install (recommended):
1 | # macOS / Linux / WSL |
The native installer places the binary at ~/.local/bin/claude, does not depend on Node.js, launches 2–3x faster than the npm version, and supports background auto-updates. The install script automatically detects your CPU architecture (x86_64 or arm64) and downloads the matching precompiled binary.
macOS users can also install via Homebrew (brew install --cask claude-code), and Windows users can use WinGet (winget install Anthropic.ClaudeCode). However, neither package manager supports automatic updates—you must run claude update manually.
About npm installation: npm install -g @anthropic-ai/claude-code used to be the only installation option, but it is now deprecated. It requires Node.js 18+ and boots the full Node runtime on every launch, making startup noticeably slower. If you are still on the npm install, migrate as soon as possible (see Section 3).
Authentication requirements: Claude Code requires a Pro, Max, Teams, Enterprise, or Console account. Free accounts are not supported. It also works through third-party cloud APIs—Amazon Bedrock, Google Vertex AI, and Microsoft Foundry—which fits enterprise teams or developers with AWS/GCP accounts using pay-as-you-go API billing.
2.2 Platform-Specific Configuration
Windows users have three options:
- Native Windows + Git Bash: Install Git for Windows first, then run the standard installer. If Claude Code cannot locate Git Bash automatically, specify its path manually:
1 | // ~/.claude/settings.json |
- WSL2: Run the Linux build of Claude Code inside WSL2. The key advantage is sandboxing (an isolation mechanism that restricts which system resources a process can access). Both WSL 1 and WSL 2 are supported, but WSL 1 does not support sandboxing.
In addition, Claude Code supports native PowerShell execution on Windows (preview), letting you run commands directly in PowerShell outside Git Bash. See the PowerShell tool documentation for details.
Alpine / musl distributions require extra setup. Alpine uses musl libc (a lightweight C standard library) instead of glibc, so you need to install the missing dependencies manually:
1 | apk add libgcc libstdc++ ripgrep |
Then disable the built-in ripgrep in settings.json:
1 | { |
Verify the installation:
1 | claude # Launch the interactive interface |
claude doctor checks binary integrity, shell configuration, network connectivity, and authentication status—making it the first command to run when troubleshooting.
2.3 Updates and Version Management
Native installs enable background auto-updates by default: new versions download quietly in the background and take effect on your next launch without interrupting your active session.
Update channel configuration:
| Setting | Value | Description |
|---|---|---|
autoUpdatesChannel |
"latest" (default) |
Get new features immediately |
autoUpdatesChannel |
"stable" |
~1-week delay; skips releases with major regressions |
Switch to the stable channel:
1 | { |
You can also run /config inside Claude Code and update the Auto-update channel setting interactively.
Disable auto-updates (for environments that require pinned versions):
1 | { |
Manual updates and installing specific versions:
1 | claude update # Manually update to latest |
Binary integrity verification: Each release includes a manifest.json containing SHA256 checksums for all platform binaries. The manifest is signed with Anthropic’s GPG key, so verifying that signature indirectly validates every binary. Native code-signature verification is also available per platform:
- macOS: Signed by “Anthropic PBC” and notarized by Apple. Verify with
codesign --verify --verbose ./claude. - Windows: Signed by “Anthropic, PBC”. Verify with
Get-AuthenticodeSignature .\claude.exe. - Linux: Verified through the signed manifest; the binary itself is not code-signed.
Uninstalling:
1 | # Uninstall native install (macOS / Linux / WSL) |
To wipe all configuration files completely (including conversation history, custom prompts, and project-level settings), remove these paths as well:
1 | rm -rf ~/.claude ~/.claude.json # Global config and conversation history |
Note: ~/.claude/ stores all your conversation logs, custom instructions, and permission settings. Back it up before deleting if you want to keep any of it.
3. Hippo’s Field Notes
💬 hippo: Here are the pitfalls I ran into during day-to-day usage:
3.1 Pitfalls When Migrating from npm to Native Install
I originally installed Claude Code with npm install -g @anthropic-ai/claude-code. When I later ran the curl script to switch to the native build, typing claude in the terminal still executed the old npm version. The culprit: npm’s global bin directory (/usr/local/bin or an nvm-managed path) appeared earlier in PATH than ~/.local/bin.
Fix steps:
1 | # 1. Install the native build first |
Another gotcha: after uninstalling the npm package, leftover cached directories from the old version remained under node_modules, taking up over 200 MB. Running rm -rf ~/.npm/_npx/ manually finally cleared it out.
Shortcut migration: Anthropic added a claude install command that installs the native binary alongside an existing npm installation, after which you can remove the npm version. Here is a complete migration checklist:
1 | # Complete migration steps |
3.2 Real-World Differences Between stable and latest
I started on the latest channel. After one update, claude doctor threw a shell hook warning and the .claude/settings.json schema changed with several new fields. It took half an hour of debugging to realize it was a breaking change.
After switching to the stable channel, I never hit that again. stable lags by roughly a week, letting early adopters filter out releases with serious regressions. Unless you specifically need a brand-new feature, stable is the safer bet.
My recommendation: use stable for personal development and for teams (to avoid config conflicts caused by version drift). Only switch to latest temporarily when you need to test a newly shipped bug fix.
3.3 My Recommended Config and Reading claude doctor Output
My ~/.claude/settings.json:
1 | { |
Just that one key. Keep it minimal and let auto-updates run quietly on the stable channel.
Key claude doctor checks explained:
| Check | Pass Indicator | How to Fix Failures |
|---|---|---|
| Binary integrity | Displays version number | Re-run the install script |
| Shell integration | Hook registered | Run claude init |
| Network | API reachable | Check proxy/VPN settings |
| Authentication | Valid login session | Run claude to sign in again |
4. FAQ
Q: What is the actual difference between the native install and the npm install?
A: The native install is a standalone binary that does not require Node.js, starts 2–3x faster, and supports background auto-updates. The npm install is deprecated and no longer officially recommended.
Q: Can I use Claude Code with a free account?
A: No. You need a Pro ($20/month) or higher plan. However, if you have an AWS account, you can run it through Amazon Bedrock with pay-as-you-go API billing.
Q: On Windows, should I use WSL2 or native Git Bash?
A: Choose WSL2 if you do Linux-targeted development on Windows. Native Windows + Git Bash fits pure Windows workflows. An extra advantage of WSL2 is sandbox support.
Q: How do I roll back to an older version?
A: Pass the target version to the install script: curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58. After rolling back, set "DISABLE_AUTOUPDATER": "1" so auto-updates do not overwrite it.
5. Summary
Quick installation decision guide:
| Scenario | Recommended Setup |
|---|---|
| macOS / Linux | Native install + stable channel |
| Windows (Linux development) | WSL2 + native install |
| Windows (pure Windows development) | Native install + Git for Windows |
| Pinned version required | Native install + DISABLE_AUTOUPDATER |
| Docker / CI environments | Install a pinned version number |
Rule of thumb: Use the native installer, stick to the stable channel, and run claude doctor first whenever something breaks.
Series Navigation
- Series Index: Claude Code Complete Guide · Series Index
- Previous: Official Docs Breakdown: Quickstart
- Next: Official Docs Breakdown: How Claude Code Works
Based on the Claude Code Official Docs — Set Up Claude Code
Last updated: 2026-04-09




