How to Install Claude Code on Mac, Windows, Linux (2026)
To install Claude Code, open a terminal and run Anthropic's native installer: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux or WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. Then open a new terminal, run claude --version, go to a project folder and type claude to sign in. It needs a paid Claude plan or a Console account.
Claude Code is Anthropic's coding assistant for the terminal, and the same tool also runs in VS Code, JetBrains IDEs, the Claude desktop app and at claude.ai/code. Below: every official install method, your first session, cost, updates and uninstalling. Commands come from Anthropic's docs; screenshots we took on November 19, 2026.
By Adi Leviim, Co-Founder at Infi Developments. 7+ years building AI productivity tools. Last reviewed November 2026.
How to Install Claude Code With the Native Installer
Anthropic recommends its native installer on every desktop system. The steps from the Claude Code quickstart, as of November 2026:
Open a terminal: Terminal on a Mac, PowerShell or Command Prompt (CMD) on Windows.
Run the command for your system:
macOS, Linux and 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
Wait. The installer shows no progress while it downloads.
Open a new terminal window and run claude --version.
Anthropic's Advanced setup page shows the same commands under the tabs Native Install (Recommended), Homebrew and WinGet. On our Mac, claude --version printed 2.1.289 (Claude Code); your number will differ.
On Windows, you do not need to run as Administrator. If you see "The token '&&' is not a valid statement separator", you are in PowerShell, not CMD; "'irm' is not recognized" means you are in CMD. Git for Windows is optional: without it, Claude Code uses PowerShell as its shell tool.
Requirements: macOS 13.0+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+, 4 GB of RAM and internet access.
Other Ways to Install Claude Code: Homebrew, WinGet, npm, Linux
Claude Code is also on Homebrew, WinGet, npm and Anthropic's signed apt, dnf and apk repositories. The trade-off: only the native installer updates itself.
Method
Install command
Updates
Native (Mac, Linux, WSL)
curl -fsSL https://claude.ai/install.sh | bash
Automatic
Native (Windows PowerShell)
irm https://claude.ai/install.ps1 | iex
Automatic
Homebrew
brew install --cask claude-code
brew upgrade claude-code
WinGet
winget install Anthropic.ClaudeCode
winget upgrade Anthropic.ClaudeCode
npm (Node.js 22+)
npm install -g @anthropic-ai/claude-code@latest
Run the same command again
apt, dnf, apk
Add Anthropic's repository, then install claude-code
Your package manager's upgrade
Homebrew has two casks: claude-code follows the stable channel, "typically about a week behind", while claude-code@latest gets new versions as soon as they ship. For npm, Anthropic says "Do NOT use sudo npm install -g". The npm package installs the same native binary, which does not run on Node.
First Steps: Sign In and Start Your First Session
Go to a project folder and type claude: a browser window opens so you can log in. Choose your Claude subscription or a Claude Console account. If the browser does not open, press c to copy the login URL. When the terminal shows "Login successful", press Enter.
cd /path/to/your/project
claude
Useful first moves:
Ask "what does this project do?"
/init creates a CLAUDE.md file of instructions Claude reads every session (it can also read AGENTS.md).
Type / to see your commands and skills; /model switches models; /usage shows plan usage.
/clear starts fresh, claude -c continues your last conversation, /exit quits.
Shift+Tab switches the permission mode.
On claude.ai/code, Claude Code showed us this notice: "Auto mode is now Claude Code's default permission mode." Claude "checks each tool call for risky actions and prompt injection before executing, runs the ones it assesses as lower-risk, and blocks the rest." For long sessions, /compact summarizes the conversation; see what Claude compacting means. Skills load in Claude Code too, covered in what Claude Skills are and how to use them.
Plan in claude.ai, build in Claude Code? AI Toolbox (formerly Claude Toolbox) adds full-text search, folders and saved prompts to your claude.ai chats: 25 search results per query, 2 top-level folders and 10 saved prompts on the free plan, unlimited on Premium. 40,000+ users on the Chrome Web Store.
No. Anthropic says "The free claude.ai plan does not include Claude Code access." You need Pro, Max, Ultra, Team or Enterprise, or a Claude Console account that pays per API token. On claude.com/pricing (November 19, 2026), Pro is $20 a month billed monthly ($17 a month billed annually), Max $100 and Ultra $200 a month; our Claude pricing guide compares every plan.
Limits are shared: activity in Claude Code and claude.ai "counts against the same limits", IDE use included. See our guide to Claude usage limits.
Watch for an API key: if ANTHROPIC_API_KEY is set and you approve it, Claude Code bills that key at API rates instead of using your subscription.
Where Else Claude Code Runs: VS Code, Web and Desktop
Claude Code also runs in VS Code, JetBrains IDEs, the Claude desktop app, the web, Slack and GitHub Actions, all on the same plan and limits.
VS Code: press Cmd+Shift+X (Mac) or Ctrl+Shift+X, search "Claude Code" and install Claude Code for VS Code by Anthropic (VS Code 1.94.0+; Cursor works too). Open the Command Palette, type "Claude Code", choose Open in New Tab. The extension bundles a CLI for its chat panel, but typing claude in VS Code's terminal still needs the install above.
JetBrains: install the Claude Code plugin from the JetBrains Marketplace. It does not bundle the CLI, so install both.
Desktop app: sign in and click the Code tab; "you don't need to install the CLI separately". See installing Claude Desktop.
Web: open claude.ai/code and connect GitHub (Pro, Max, Ultra, Team and some Enterprise seats).
There you pick an environment, repo and model. Our screenshot shows a banner: "Fable 5.2 is here for your longest and toughest coding tasks. It draws down usage faster than Opus 5.5." Compare Cowork, Chat and Claude Code to pick one.
How to Update Claude Code
Native installs update in the background, and the new version takes effect the next time you start Claude Code. Run claude update to update now; if you are current it says "Claude Code is up to date".
Package managers do not auto-update: use the upgrade commands in the table above. npm users reinstall with @latest (Anthropic says avoid npm update -g).
Channels:/config, Auto-update channel, offers "latest" (default) or "stable" (about one week old).
New models need new versions: "Fable 5.2 requires Claude Code v2.1.321 or later", and a new model "can require a Claude Code version newer than the stable channel serves."
Stuck? claude doctor prints diagnostics.
How to Uninstall Claude Code
Remove Claude Code the way you installed it. Native, on macOS, Linux or WSL:
Package managers: brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode, npm uninstall -g @anthropic-ai/claude-code or sudo apt remove claude-code. Settings live in ~/.claude and ~/.claude.json; deleting them erases "all your settings, allowed tools, MCP server configurations, and session history".
Limitations
Claude Code ships new versions every few days, so labels, defaults and version numbers here may already differ on your machine. Plan prices and limits can change too. Claude Code runs shell commands through its Bash or PowerShell tool, so read what it proposes before approving, especially in Auto mode. AI Toolbox is a browser extension for claude.ai chats and adds nothing to Claude Code in your terminal or IDE. See also our ChatGPT vs Claude coding comparison and Claude for developers.
Frequently Asked Questions
How do I install Claude Code on Windows?
Open PowerShell and run irm https://claude.ai/install.ps1 | iex, or use the install.cmd command from Anthropic's docs in Command Prompt. No Administrator rights are needed. Open a new terminal and run claude --version. WinGet users can run winget install Anthropic.ClaudeCode instead, but updates are then manual.
Is Claude Code free to use?
No. Anthropic says the free claude.ai plan does not include Claude Code. You need a Pro, Max, Ultra, Team or Enterprise plan, or a Claude Console account billed per API token. On subscriptions, Claude Code and claude.ai share the same usage limits, so heavy coding uses chat allowance too.
Do I need Node.js to install Claude Code?
No. The native installer, Homebrew, WinGet and Anthropic's Linux repositories need no Node.js. Only the npm package needs Node.js 22 or later, and it installs the same native binary that runs without Node. Anthropic warns never to install the npm package with sudo.
How do I update Claude Code?
Native installs update automatically in the background and apply the update the next time you start Claude Code. Run claude update to update immediately. Homebrew, WinGet, apt, dnf and apk installs do not auto-update, so use your package manager's upgrade command; npm users reinstall with the latest tag.
How do I uninstall Claude Code completely?
Remove the binary the way you installed it: delete ~/.local/bin/claude and ~/.local/share/claude for the native installer, or use brew, winget or npm uninstall. Delete ~/.claude and ~/.claude.json only if you also want to erase your settings and session history, which cannot be undone.
Can I use Claude Code without the terminal?
Yes. Claude Code runs in VS Code through the official extension, in JetBrains IDEs through a plugin, in the Code tab of the Claude desktop app, and on the web at claude.ai/code with a connected GitHub account. All of them need a paid Claude plan and share its usage limits.
Bottom Line
Install Claude Code with one command (the curl script on Mac, Linux and WSL, the irm script in PowerShell), open a new terminal, check claude --version and run claude in a project to log in. You need a paid plan or a Console account; native installs keep themselves current.
A Full Stack Developer with 7+ years of experience building AI productivity tools. Leads product development and frontend architecture for AI Toolbox, the Chrome extension suite (ChatGPT, Gemini, Grok, and Claude modules) that helps users search, organize, and export their AI conversations.
Liked this guide? Get the next one first.
Join 40,000+ readers getting practical prompts, new features, and subscriber-only deals. No spam, unsubscribe in one click.
New features and product updates before anyone else
Time-saving prompts and workflows for ChatGPT, Gemini, Claude, and Grok