I have onboarded about twenty developers onto Claude Code in the last six months. Every single one has hit at least one of the same small install gotchas. This guide covers all of them, plus the full install instructions from Anthropic's official docs, plus the first-session checklist that makes the difference between "I tried it and bounced" and "I actually use this daily."
If you just want the shortest path, run this one command on Mac or Linux:
curl -fsSL https://claude.ai/install.sh | bashOn Windows PowerShell:
irm https://claude.ai/install.ps1 | iexEverything below is context, alternative methods, and troubleshooting for when the one-liner is not the right choice.
#Before you install
You need two things before Claude Code will do anything useful.
First, you need an account. Claude Code requires either a Claude Pro subscription at $20 a month or an Anthropic Console account for API access. If you do not have one, create it at claude.com/pricing or console.anthropic.com. We have a full post on Claude Code pricing that walks through which plan to pick. And a post on whether Claude Code is free if cost is your main constraint.
Second, you need a terminal or a supported IDE. Claude Code runs in your terminal on Mac, Linux, or Windows 11. It also has official IDE integrations for VS Code, Cursor, and JetBrains IDEs (IntelliJ, WebStorm, PyCharm). Desktop apps are available for macOS and Windows if you prefer a standalone app.
#Mac and Linux: native installer
This is the method Anthropic recommends and the one I use. It is the fastest path from zero to a working Claude Code install.
curl -fsSL https://claude.ai/install.sh | bashThat is the whole command. It downloads the install script, runs it, and puts claude on your PATH. Native installs automatically update in the background, so you stay on the latest version without thinking about it. This is different from Homebrew, which does not auto-update and requires manual upgrades.
After the install finishes, verify it worked:
claude --versionYou should see a version string. If command not found happens, your shell may need a restart or a PATH refresh. Close the terminal, open a new one, and try again. If it still fails, the install script did not add the binary to your PATH. The native installer typically puts claude in ~/.local/bin, so you can add that to your shell's PATH manually.
#Mac: Homebrew
If you prefer Homebrew for everything, Claude Code ships two casks.
# Stable channel, about a week behind, skips broken releases
brew install --cask claude-code
# Latest channel, newest features as soon as they ship
brew install --cask claude-code@latestThe claude-code cask tracks the stable release channel, which is typically about a week behind head and skips releases with major regressions. The claude-code@latest cask tracks the newest releases and gets new features immediately, at the cost of occasional rough edges.
Homebrew installs do not auto-update. You need to run brew upgrade claude-code or brew upgrade claude-code@latest periodically to get new features and security fixes. If you want automatic updates, stick with the native installer instead.
#Windows: native installer
Two options on Windows. First is PowerShell:
irm https://claude.ai/install.ps1 | iexSecond is Command Prompt (CMD):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdOne important note from the official docs: if you see The token '&&' is not a valid statement separator, you are in PowerShell, not CMD. Use the PowerShell command instead. Your prompt shows PS C:\ when you are in PowerShell and C:\> when you are in CMD.
Windows requires Git for Windows. Claude Code depends on the git binary and a POSIX-like shell. Install Git for Windows first if you do not have it. This is the single most common install failure I see on fresh Windows machines.
#Windows: WinGet
If you prefer the Windows package manager, WinGet works:
winget install Anthropic.ClaudeCodeLike Homebrew, WinGet installs do not auto-update. Run winget upgrade Anthropic.ClaudeCode periodically to get new features and security fixes.
#WSL (Windows Subsystem for Linux)
If you do your real work in WSL, install Claude Code inside WSL as if it were Linux. The Mac and Linux install command works verbatim:
curl -fsSL https://claude.ai/install.sh | bashRunning Claude Code inside WSL gives you Linux-native file paths, a real bash shell, and the ability to work against your Linux dev environment. This is what I would recommend if you have any option at all, because Claude Code on bare Windows PowerShell is a supported but second-class experience compared to Linux.
#Install matrix by platform
| Feature | Native installer | Homebrew | WinGet | WSL |
|---|---|---|---|---|
| macOS | ✓ | ✓ | ✕ | ✕ |
| Linux | ✓ | ✕ | ✕ | ✕ |
| Windows Windows 11 required | ✓ | ✕ | ✓ | ✓ |
| Auto-updates | ✓ | ✕ | ✕ | ✓ |
| Recommended for most users | ✓ | ✕ | ✕ | ◐ |
#IDE extensions
Claude Code has official extensions for the major IDEs. These are installed separately from the CLI, and they work alongside the CLI on the same account.
VS Code: Open the Extensions view (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows and Linux), search for "Claude Code," and click Install. You can also install from the VS Code marketplace directly at vscode:extension/anthropic.claude-code.
Cursor: Same extension as VS Code, since Cursor is a VS Code fork. Search for "Claude Code" in the Cursor Extensions panel. Direct install link: cursor:extension/anthropic.claude-code.
JetBrains IDEs: Install the Claude Code plugin from the JetBrains Marketplace. It works in IntelliJ IDEA, WebStorm, PyCharm, GoLand, and the rest of the JetBrains family. Restart your IDE after install.
After installing an extension, you need to authenticate once. Open the command palette (Cmd+Shift+P or Ctrl+Shift+P), type "Claude Code," and select the authenticate option. Your browser opens, you sign in, and from then on the extension uses your Claude account.
#Desktop app
If you prefer a standalone desktop app, downloads are available for:
- macOS (Intel and Apple Silicon): via claude.ai/download
- Windows (x64): via claude.ai/download
- Windows ARM64: via claude.ai/download
The desktop app gives you visual diff review, multiple sessions side by side, scheduled recurring tasks, and the ability to kick off cloud sessions. It requires a paid Claude subscription. Most developers end up using a mix of terminal CLI for coding work and desktop app for visual review of large diffs.
#First-session checklist
Install is the easy part. The hard part is using Claude Code well in your first session. Here is the five-step checklist I give every developer I onboard.
Step 1: Open a project you already know. Do not try Claude Code on a brand-new greenfield project on your first session. Pick something you have been working on, where you can sanity-check the output. cd into that directory and run claude.
Step 2: Authenticate. Claude Code opens your browser and asks you to sign in. Return to the terminal and you should see a confirmation that you are authenticated.
Step 3: Ask "what does this project do?" as your first prompt. This is the warmup prompt Anthropic officially recommends. Claude Code reads your repo, identifies the stack, and summarizes what it sees. This does two things: it populates the session context with useful information, and it tells you whether Claude Code has correctly understood your project.
Step 4: Write a minimal CLAUDE.md. Create a file called CLAUDE.md in your project root with ten to twenty lines that cover your test command, your preferred libraries, and two or three "do not do this" rules. This file is read at the start of every session and makes subsequent prompts dramatically more useful. There is a full section on CLAUDE.md in our complete guide.
Step 5: Try a real task. Pick something from your actual backlog that is medium complexity (touches 3 to 10 files) and well-specified. Describe it to Claude Code. Watch what happens. If you are like most new users, your first reaction will be a mix of impressed and nervous, and that is the right reaction.
#Troubleshooting
The four issues I see most often when onboarding new developers.
command not found: claude after a fresh install usually means your shell has not picked up the new PATH. Close the terminal, open a new one, and try again. If that does not work, check that ~/.local/bin (or wherever the installer put the binary) is in your PATH.
Authentication failures on first login are almost always browser-related. Claude Code opens your default browser and expects to redirect back to the CLI. If you have a weird default browser setup or if you are on a remote machine without a browser, use the manual auth flow in the docs.
WSL users running Claude Code from Windows sometimes get path confusion because claude on the Windows PATH and claude inside WSL are two different installations. Pick one location and stick with it. I recommend WSL-only.
Slow first session on large repos is expected. Claude Code reads context lazily, but the first prompt on a 100,000-line codebase takes a while to warm up. Subsequent prompts are faster because caching kicks in.
#Updating Claude Code
Native installs on Mac, Linux, and Windows update themselves in the background. You do not need to do anything.
Homebrew installs need manual upgrades. Run brew upgrade claude-code or brew upgrade claude-code@latest.
WinGet installs need manual upgrades. Run winget upgrade Anthropic.ClaudeCode.
VS Code, Cursor, and JetBrains extensions update through their respective marketplaces. Enable auto-update in your IDE settings and forget about it.
Check your current version any time with claude --version.
Try It Out
Ready to practice with AI-first tools?
Once Claude Code is set up, the next step is practicing agentic coding workflows on real problems. Our AI interview prep covers the exact workflows modern engineering teams care about.
#FAQ
Frequently asked questions
How do I install Claude Code on Mac?
How do I install Claude Code on Windows?
Is Claude Code available on Linux?
Do I need a subscription to install Claude Code?
How do I install Claude Code in VS Code?
How do I update Claude Code to the latest version?
#Related reading
- Claude Code: The Complete 2026 Guide for what to do after install
- Claude Code Pricing: Every Plan Explained
- Is Claude Code Free? if cost is your main constraint
- What Are MCP Servers? for the next install step after Claude Code
