How to install Claude Code
Pick your system and copy the install command from Anthropic's docs, then sign in and start your first session.
Short answer
One command, no Node.js needed.
Anthropic’s Claude Code docs recommend the native installer: one line in Terminal on a Mac or Linux, one line in PowerShell on Windows. It updates itself and needs no Node.js. Then run claude in your project and sign in with a paid Claude plan or a Claude Console account.
0dependencies
npm route: Node.js 22+Claude Code install command for your system
Pick your system. You get the install method Anthropic’s docs recommend for it, the exact command to copy and the steps to your first session.
- 01Recommended: the native installer. You need macOS 13.0 or later. Press Cmd + Space, type Terminal and press Enter.
- 02Paste the command below with Cmd + V and press Enter. It shows no progress while it downloads.
- 03Open a new Terminal window and run claude doctor, or claude with the version option. A version number followed by (Claude Code) means it worked.
- 04Go to your project folder with cd, type claude and press Enter. A browser window opens to sign in.
Prefer Homebrew? The docs give the cask below. It follows the stable channel, about a week behind, and does not update itself: run brew upgrade claude-code from time to time.
- 01Recommended: the native installer in PowerShell. You need 64-bit Windows 10 1809 or later. Press Win + X and select Windows PowerShell or Terminal. Your prompt starts with PS.
- 02Paste the command below with Ctrl + V and press Enter. You do not need to run as Administrator.
- 03Open a new PowerShell window and run claude doctor. If claude is not recognized, the install folder is not on your PATH yet; the installer prints the fix under Setup notes.
- 04Go to your project folder, type claude and press Enter, then sign in in the browser.
In CMD (the prompt has no PS), use the line below instead. WinGet also works: winget install Anthropic.ClaudeCode, updated by hand with winget upgrade Anthropic.ClaudeCode. Git for Windows is optional but recommended, so Claude Code can use its Bash tool. Working in WSL? Open your WSL distribution and use the Linux command.
- 01Recommended: the native installer. Supported: Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+, with 4 GB of RAM or more. Open a terminal, on most distributions with Ctrl + Alt + T.
- 02Paste the command below with Ctrl + Shift + V and press Enter. The same command works inside WSL on Windows.
- 03Open a new terminal and run claude doctor. If you see bash: claude: command not found, add ~/.local/bin to your PATH with the second line, then open a new terminal.
- 04Go to your project folder, run claude and sign in in the browser. On a server without a browser, press c to copy the login link.
Debian, Ubuntu, Fedora, RHEL and Alpine can also install from Anthropic’s signed apt, dnf and apk repositories; those packages update with your system, not on their own. Alpine first needs bash, curl, libgcc, libstdc++ and ripgrep.
- 01Use npm only if you want Claude Code as a global npm package: the docs still offer it, and the GitHub README marks it deprecated. You need Node.js 22 or later.
- 02Run the command below without sudo. Claude Code updates itself through npm without sudo, so an install that needs it cannot update.
- 03Open a new terminal and run claude doctor, then run claude in your project and sign in.
- 04To upgrade later, add @latest to the package name in the same command. The docs advise against npm update -g, which may not reach the newest release.
The package installs the same native binary as the installer; claude does not run on Node.js. If npm prints a version starting with 12, the docs have a separate fix for npm 12.
Claude Code system requirements
Anthropic’s setup page lists what Claude Code needs before you install it. It runs on macOS, Windows and Linux with a 64-bit processor, x64 or ARM64, and at least 4 GB of RAM. It needs an internet connection, and it works only in the countries on Anthropic’s supported countries list. The shell can be Bash, Zsh, PowerShell or CMD.
Checked November 8, 2026, on the Claude Code docs:
| System | Minimum | Recommended install |
|---|---|---|
| Mac | macOS 13.0 | Native installer or Homebrew |
| Windows | Windows 10 1809, Server 2019 | Native installer or WinGet |
| Ubuntu | 20.04 | Native installer or apt |
| Debian | 10 | Native installer or apt |
| Alpine Linux | 3.19 | Native installer or apk |
| Fedora, RHEL | Not listed | dnf repository |
Git is optional. ripgrep, which Claude Code uses to search your files, usually comes with it. Installing needs roughly 512 MB of free memory, the troubleshooting page says, and running needs more.
How to install Claude Code on Mac, Windows and Linux
The docs offer four routes, and the tool above gives the command for each system:
- Native installer, recommended. One line for macOS, Linux and WSL, one for Windows PowerShell and one for Windows CMD. It puts claude in ~/.local/bin (on Windows, the .local\bin folder in your user folder) and updates itself in the background.
- Homebrew on a Mac, WinGet on Windows. Package manager installs that do not update by default. The cask claude-code follows the stable channel; claude-code@latest gets every release as it ships.
- apt, dnf and apk on Linux. Signed repositories for Debian, Ubuntu, Fedora, RHEL and Alpine, on a stable or latest channel. Updates come with your normal system upgrades.
- npm. A global npm package that needs Node.js 22 or later. The GitHub README now labels it deprecated.
On Windows you can run Claude Code natively or inside WSL. The docs’ comparison: native Windows suits Windows projects and tools; WSL 2 suits Linux toolchains and is the only Windows option with sandboxed command execution. In WSL you install and launch claude inside the WSL terminal, not from PowerShell. On native Windows, Git for Windows is optional: with it, Claude Code uses Git Bash for its Bash tool; without it, it runs commands through PowerShell.
If you would rather skip the terminal, Anthropic also has a Claude Desktop app for macOS and Windows, with a beta for Ubuntu and Debian, that runs Claude Code in its Code tab. It needs a paid plan and no separate CLI install.
Node.js for Claude Code: do you need it?
Not for the native installer, Homebrew, WinGet or the Linux packages. They install a standalone binary, and the setup page lists no Node.js among the requirements.
Node.js matters only if you install Claude Code with npm. The docs ask for Node.js 22 or later. On an older version, npm prints an EBADENGINE warning instead of failing, the install completes and claude still runs, because the package downloads a native binary that does not use your Node.js at runtime. The README on Anthropic’s GitHub still shows an older Node.js 18+ badge; the docs’ figure is the current one.
Two npm problems come up often in the docs. Do not use sudo npm install, which the docs warn can cause permission issues and security risks; if you hit permission errors, switch to the native installer. And on Windows, PowerShell may refuse to run npm with running scripts is disabled on this system: allow local scripts for your user with Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser, call npm.cmd instead, or use the PowerShell installer.
Sign in to Claude Code: Claude subscription or Claude Console
Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account; the docs say the free Claude.ai plan does not include it. The first time you run claude, it opens a browser window to log in. The docs’ account types:
- Claude Pro, Max or Ultra subscription. Log in with your Claude.ai account.
- Claude for Teams or Enterprise. Log in with the Claude.ai account your team admin invited.
- Claude Console. Log in with your Console credentials after your admin has invited you. At the login prompt, choose Sign in with your Console account, marked recommended, or Create an API key, marked legacy.
- Cloud providers. Amazon Bedrock, Google Cloud’s Agent Platform or Microsoft Foundry, set up with environment variables or 3rd-party platform at the login prompt.
If you set the ANTHROPIC_API_KEY environment variable and approve the key when Claude Code asks, it skips the browser login. If the browser does not open, press c to copy the login link and paste it into a browser yourself; if the browser shows a code, paste it at the Paste code here if prompted line. The terminal shows Login successful when you are in. To switch accounts, type /login; to sign out, /logout.
The cheapest plan with Claude Code on Anthropic’s pricing page, read November 8, 2026, is Pro at $20 a month, or $17 a month billed yearly.
First run: start Claude Code in your project
- 01Open a terminal in your project folder, for example with cd and the path to the project.
- 02Type claude and press Enter. After sign-in, the prompt shows the version, the current model and the working folder above it.
- 03Ask a first question, such as what does this project do? Claude reads your files and answers.
- 04Type /help for the list of commands, or /resume to continue an earlier conversation.
Your login is stored, so you do not sign in again on the next run. For a full check of the install and your settings without starting a session, run claude doctor in your shell: it reports install health, settings errors and warnings with suggested fixes.
Install Claude Code in VS Code and JetBrains
The Claude Code docs describe two editor integrations.
VS Code extension. You need VS Code 1.94.0 or later. Press Cmd+Shift+X on a Mac or Ctrl+Shift+X on Windows and Linux, search for Claude Code and select Install. The same extension installs in Cursor and other VS Code forks. If it does not appear, restart VS Code or run Developer: Reload Window. The extension bundles its own copy of the CLI for its chat panel and does not add claude to your PATH, so to run claude in the VS Code terminal you also need the standalone install from the tool above.
JetBrains plugin. It works with IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, GoLand and most other JetBrains IDEs. Install the CLI first, then the Claude Code plugin from the JetBrains Marketplace, and restart the IDE. The plugin shows Cannot launch Claude Code when claude is not on your PATH. From a terminal outside the IDE, run claude and then /ide to connect.
How to update Claude Code
A native install checks for updates when it starts and while it runs, installs them in the background and uses the new version the next time you start it. To update right away, run claude update. Package manager installs update by hand:
- Homebrew: brew upgrade claude-code, or brew upgrade claude-code@latest for the latest cask.
- WinGet: winget upgrade Anthropic.ClaudeCode.
- apt, dnf, apk: sudo apt update && sudo apt upgrade claude-code, sudo dnf upgrade claude-code, or apk update && apk upgrade claude-code.
- npm: npm install -g @anthropic-ai/claude-code@latest.
The native installer follows the latest channel by default. To get a build about a week old that skips releases with major regressions, open /config in Claude Code and set Auto-update channel to stable.
Claude Code install errors and fixes
These messages and fixes come from Anthropic’s Troubleshoot installation and login page, read November 8, 2026.
- command not found: claude, or claude is not recognized. The install worked but its folder is not on your PATH. On a Mac with Zsh, add ~/.local/bin to ~/.zshrc; with Bash on Linux, to ~/.bashrc (the tool above has the line). Then open a new terminal: a window that was already open, or a terminal inside an editor, keeps the old PATH.
- syntax error near unexpected token <, or curl: (22) with error 403. The install address returned a web page instead of the script. If the output mentions App unavailable in region, Claude Code is not offered in your country. Otherwise retry after a few minutes, check a corporate proxy or firewall, or install with Homebrew or WinGet.
- A parameter cannot be found that matches parameter name fsSL. You ran the Mac and Linux line in Windows PowerShell. Use the PowerShell installer.
- Claude Code does not support 32-bit Windows. You probably opened Windows PowerShell (x86). Close it and open Windows PowerShell without x86 in the name.
- Killed during install on Linux. The server ran out of memory. Add swap space, close other programs or use a larger instance.
- EACCES: permission denied. The install folder is not writable. After an npm install, switch to the native installer rather than using sudo.
- OAuth error: Invalid code. The login code expired or was cut off. Press Enter to retry and finish quickly. Over SSH, open the link in the browser on your own computer.
When login fails for no clear reason, the docs’ reset is to run /logout, close Claude Code, start claude again and sign in.
5How to uninstall Claude Code
Remove it the way you installed it. For a native install on a Mac, Linux or WSL, delete the launcher and the version files: rm -f ~/.local/bin/claude, then rm -rf ~/.local/share/claude. On Windows, delete claude.exe from the .local\bin folder and the .local\share\claude folder in your user folder. With WinGet, run winget uninstall Anthropic.ClaudeCode; with npm, npm uninstall -g @anthropic-ai/claude-code; with Homebrew, brew uninstall with the cask option and the cask you installed.
Your settings, MCP server setup and session history stay in ~/.claude and ~/.claude.json until you delete them, and the docs warn that deleting them removes all of it. The VS Code extension, the JetBrains plugin and the Desktop app write to the same folder, so uninstall them first. If claude still runs afterwards, you have a second install or an old shell alias.
FAQ
What is the npm install command for Claude Code?
npm install -g @anthropic-ai/claude-code, with Node.js 22 or later and without sudo. Anthropic’s docs still list it, but its GitHub README calls npm deprecated and recommends the native installer.
How do I install Claude Code in the VS Code terminal?
Run the standalone installer from the tool above, then open a new VS Code terminal and type claude. The VS Code extension alone does not put claude on your PATH.
Can you install Claude Code on an iPad?
Not the CLI: its requirements list only macOS, Windows and Linux. The docs say Claude Code on the web runs in desktop browsers and in the Claude app for iOS and Android, with no local setup.
How do I add Claude Code to GitHub?
Open claude in your repository and run /install-github-app. It installs the Claude GitHub App, adds the secret and prepares the workflow. You need the GitHub CLI signed in and admin access to the repository.
Is Claude Code free to install?
The install is free, but using it is not on the Free plan. You need Pro, Max, Ultra, Team or Enterprise, or a Claude Console account that pays per token.
Where do I download Claude Code?
The CLI has no download page: the install command fetches it. For a window instead of a terminal, Anthropic offers the Claude Desktop app for macOS, Windows and Linux.
Do I need WSL to run Claude Code on Windows?
No. Claude Code runs natively on Windows 10 1809 or later from PowerShell or CMD. WSL 2 is the option for Linux toolchains and sandboxed commands.
Sources
- Anthropic, Claude Code Docs, Advanced setup (system requirements, install, update, uninstall), read November 8, 2026
- Anthropic, Claude Code Docs, Quickstart, read November 8, 2026
- Anthropic, Claude Code Docs, Troubleshoot installation and login, read November 8, 2026
- Anthropic, Claude Code Docs, Authentication, read November 8, 2026
- Anthropic, Claude Code Docs, Terminal guide, read November 8, 2026
- Anthropic, Claude Code Docs, Use Claude Code in VS Code, and JetBrains IDEs, read November 8, 2026
- Anthropic, Claude Code Docs, Overview and Claude Code GitHub Actions, read November 8, 2026
- Anthropic, claude-code repository README on GitHub, read November 8, 2026
- Anthropic, Claude pricing page, read November 8, 2026
Spotted a command that no longer matches? Write to support@gptx.io and we will check it.
Next up7 minClaude Code pricing$20What Claude Code costs on Pro, Max, Ultra and Team, and on an API key instead.