Checked against the Claude Code docs · 4 OctDocs checked · 4 OctNo Node.js needed25 install errors, each with its fix
Install Claude Code on Any Computer (and Fix Every Install Error)
Pick your system, copy one command, and see what a good install looks like. If it fails, paste the error below for the exact fix.
macOS selected
Terminal (zsh)
$ curl -fsSL https://claude.ai/install.sh | bash
Open a new terminal window so PATH is fresh.
Run claude --version to confirm.
Run claude and log in with your plan.
Apple Silicon and Intel. If claude is not found afterwards, open a new window first.
What you should see · example
$ curl -fsSL https://claude.ai/install.sh | bashSetting up Claude Code...Claude Code successfully installed! Version: 2.1.211 Location: ~/.local/bin/claude$ claude --version2.1.211 (Claude Code)
By Junaid Khalid, software engineer (BSc, NUST) and former CTO who ships AI tools dailyReviewed 4 OctChangelogEvery command and fix is checked against the Claude Code docs. YouTube · X · LinkedIn
How do I install Claude Code?
Short answer
On macOS, Linux or WSL run curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell run irm https://claude.ai/install.ps1 | iex. Open a new terminal, run claude --version to confirm, then claude to log in. You need a paid Claude plan or an API account; Node.js is not required.
The native installer is the shortest correct path. It downloads one binary into ~/.local/bin, adds nothing to your system Node, and updates itself in the background. Older guides still teach npm install -g; that route works, but it brings back the Node version and permission errors the native installer removed.
Is Claude Code free?
Short answer
No. Claude Code needs a paid Claude plan (Pro, Max, Team or Enterprise) or a Console API account billed per token. The free claude.ai plan does not include it. The software itself installs at no cost, so you can install first and log in once your plan is active.
Three checks before you install, sixty seconds in total:
01 · plan
A paid plan or API account
Pro, Max, Team, Enterprise or Console. The login step fails on a free account, not the install.
02 · system
A supported OS
macOS 13+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+. 64-bit only.
03 · memory
4 GB of RAM
More is comfortable, but less has worked. Low-memory servers can kill the installer itself.
It runs fine for me on an old ThinkPad X220 loaded with 8 GB
All six methods install the same Claude Code. They differ in what happens three weeks later, when a new version ships. That is the column nobody else compares, and the one that decides which method you will be happy with.
Method chooser: three questions
Your system
Updates without asking?
Managed by IT?
Use this
Native installer
curl -fsSL https://claude.ai/install.sh | bash
Updates itself in the background and needs no Node or admin rights.
Open Terminal, paste the installer, then open a new window so your shell picks up ~/.local/bin. If claude is still not found, the folder is missing from your PATH:
One trap catches people who installed through npm years ago: Homebrew's Node can leave a claude symlink pointing at nothing. Remove the npm copy first, then run the native installer.
claude command not found after npm install -g on macOS with Homebrew due to incorrect symlink
Native Windows is the simpler start. WSL2 is the better home if your code already lives in Linux or you want the built-in sandbox, which only runs there. Either way, the most common Windows failure is running the right command in the wrong shell. Look at your prompt first:
Copy the URL into a Windows browser if it does not open
32-bit Windows
Not supported
Not supported
Two more Windows surprises: installing the Claude desktop app can take over the claude command in PATH, and Shift+Enter for a new line needs /terminal-setup in some terminals.
Copying an image in Windows and pressing Ctrl+V in Claude Code doesn't work
The same install.sh works on glibc distributions. Alpine and other musl systems need three libraries and the system ripgrep, because the bundled one is built for glibc:
On a 1 GB VPS the installer can be killed for memory before it finishes; add swap first (the fix is in the error finder below). In Docker, run the install as the user who will run claude, not as root, or the binary lands in root's home.
Check that it works
Three commands, in order. The first proves the binary is on your PATH, the second checks the install and update setup, the third starts the login. The output lines below are examples; your version number will differ.
check the binary
$ claude --version
2.1.211 (Claude Code)
check the install · example output
$ claude doctor
Install method: native · Auto-updates: enabled · Version: 2.1.211
start and log in
$ claude
Opens your browser to log in. Paste the code back if it asks.
Paste your error: the install error finder
Paste the whole error or just a few words. Every card names the cause in one line, gives the fix you can copy, and links the official doc or GitHub issue it came from. Each card has its own link, so you can send someone straight to the fix.
All 25 errors
No card matches that yet. Try the first line of the error, or a shorter phrase such as "not recognized" or "timeout".
claude: command not found
Cause: The installer put claude in ~/.local/bin, which is not on your PATH yet, or you have not opened a new terminal since installing.
Run these in PowerShell: the first command checks PATH, the other two add the folder. Then restart your terminal and run claude --version. In CMD, add %USERPROFILE%\.local\bin to your user PATH in System Settings, Environment Variables.
bash: line 1: syntax error near unexpected token `<'
Cause: The install URL returned an HTML page (a block, a captive portal, a proxy error page, a 403 or a region restriction) and the shell tried to run it.
zsh or bash
curl -fsSL https://claude.ai/install.sh | head -c 200
If the output is an HTML page (its first line is a DOCTYPE tag) rather than a shell script, you are not getting the script. Try another network, switch off the VPN or proxy, or use the Homebrew (brew install --cask claude-code) or WinGet (winget install Anthropic.ClaudeCode) method instead.
Cause: Bash did not receive the complete install script. Exit code 56 means the download was interrupted; code 23 means curl could not write to the pipe, usually because Bash exited early.
The first command checks that you can reach the download server (a first line of HTTP/2 200 is good). If you can, the failure was probably intermittent, so run the install again. Otherwise try another network or an alternative install method.
Cause: A corporate proxy or antivirus is intercepting HTTPS with its own certificate that your system does not trust, or your system certificates are out of date.
First command: Ubuntu and Debian CA update. Second: install through a proxy that inspects TLS, using the CA file from IT. Third: make Claude Code itself trust that CA once installed. On Windows, enable TLS 1.2 in PowerShell or install with WinGet.
The first command should print HTTP/2 200 on its first line. Replace the proxy address with your own and set HTTP_PROXY as well. A 403 usually means a network filter or an unsupported region.
Failed to download binary: The process cannot access the file because it is being used by another process
Cause: The installer could not write to %USERPROFILE%\.claude\downloads. A previous install attempt is still running, or antivirus is scanning a half-downloaded binary there.
Cause: A small server or container ran out of memory and the Linux out-of-memory killer stopped the installer (exit code 137). The install needs roughly 512 MB of free memory.
Raw mode is not supported on the current process.stdin
Cause: During install, your organisation's server-managed settings need an approval dialog, and a dialog needs a terminal. When the installer runs from a pipe (curl ... | bash) there is none. Versions before 2.1.246 try to show the dialog during install.
Run the installer again: it installs the latest release, which skips the dialog and shows it in your next interactive session instead. The exception is organisations that force a fail-closed settings refresh at startup.
Cause: The native binary uses CPU instructions your processor does not have. Either the installer downloaded the wrong architecture (for example x86 on an ARM server) or the CPU lacks AVX (roughly pre-2013 chips, or a VM that hides AVX from the guest).
bash
uname -mgrep -m1 -ow avx /proc/cpuinfo
If uname -m does not match the binary you got, report it on GitHub. An empty result from the second command means no AVX. There is no native-binary workaround, and alternative install methods download the same binary; the docs track it in GitHub issue 50384.
Cause: The distribution is running under WSL 1 and hits a known native-binary regression (GitHub issue 38788): WSL 1's loader cannot handle the binary's program headers.
PowerShell
wsl -l -vwsl --set-version <DistroName> 2
Run these in PowerShell and replace <DistroName> with the name the first command lists, for example Ubuntu. To stay on WSL 1, the docs show a shell function for ~/.bashrc that starts the binary through /lib64/ld-linux-x86-64.so.2.
Cause: The global npm folder (or the install folder) is not writable by your user. Do not fix this with sudo.
zsh or bash
curl -fsSL https://claude.ai/install.sh | bash
The native installer needs no npm permissions. If a native install fails on permissions, check that ~/.local/bin and ~/.claude are writable. Never run sudo npm install -g.
EBADENGINE Unsupported engine (Node.js version warning on npm install)
Cause: The npm package asks for Node.js 22 or later. On an older Node.js, npm prints an EBADENGINE warning but the install still completes and claude still runs, because the package downloads a native binary that does not use your Node.js at runtime. Older Claude Code releases (the era of GitHub issue 8410) did require Node 18.
'claude' is not recognized after an update, and claude.exe is missing
Cause: To update on Windows, Claude Code renames the existing claude.exe to a backup and moves the new version in. If that second step fails (often antivirus), claude.exe is left missing and the backup is named claude.exe.old.<timestamp>.
Run in PowerShell. Rename the newest backup back to claude.exe. If there is no backup, or claude still fails, run the last command to reinstall. Check your antivirus quarantine list too. WinGet (winget install Anthropic.ClaudeCode) is an alternative.
Cause: The login request cannot reach the Anthropic auth servers: DNS, VPN, proxy, IPv6 or firewall. A user report in GitHub issue 33238 found auth.anthropic.com failing to resolve.
zsh or bash
nslookup auth.anthropic.comclaude auth login
Try a different network or switch off the VPN. If the browser cannot open or reach Claude Code, press c at the login prompt to copy the login URL and open it in a browser on your own machine, then paste the code back. On WSL2, SSH and containers this paste-the-code flow is the normal path.
OAuth error: Invalid code. Please make sure the full code was copied
Cause: The login code expired or was truncated when you copied it, often because the terminal wrapped the line.
zsh or bash
claude auth login
Press Enter at the prompt to retry and finish the login quickly after the browser opens. Type c to copy the full login URL if the browser does not open. In a remote or SSH session, open the URL in your local browser.
Cause: The login worked but the request was refused: an inactive Pro or Max subscription, a Console account without the Claude Code or Developer role, or a proxy interfering with API requests.
Pro and Max users: check your subscription is active at claude.ai/settings. Console users: ask an admin to give you the Claude Code or Developer role (Console, Settings, Members). Behind a proxy, see the network configuration docs.
Claude Code access has not been granted for this account. Contact your administrator.
Cause: Your Claude Enterprise organisation set your role to Custom, and none of the custom roles assigned to your groups grants Claude Code. Nothing you change in Claude Code fixes this.
zsh or bash
claude
Ask an Owner of your Claude organisation to assign a custom role that grants Claude Code to one of your groups, or to change your role from Custom to a standard role such as User. Then run claude and log in again. Separately, the free claude.ai plan does not include Claude Code: you need Pro, Max, Team, Enterprise or a Console account.
This organization has been disabled (or Missing API key) after login
Cause: An old ANTHROPIC_API_KEY in your shell profile overrides your subscription login, so you see "This organization has been disabled" despite an active plan. In non-interactive mode (-p) the key is always used when present.
If the first command prints set, remove the variable and delete any export ANTHROPIC_API_KEY line from ~/.zshrc, ~/.bashrc or ~/.profile. Run /status inside Claude Code to confirm which login is active. A separate case, GitHub issue 5244, was a macOS login that was not persisted.
Cause: Your saved login expired or was revoked. On macOS it can also mean the login Keychain is locked or out of sync, so Claude Code could not save the login.
zsh or bash
claude doctorsecurity unlock-keychain ~/Library/Keychains/login.keychain-db
Run /login inside Claude Code. If it keeps happening, check that your system clock is correct. On macOS, claude doctor warns when the Keychain is not writable: unlock it with the second command, then /logout and /login.
Cause: WSL hands Windows clipboard images to Linux in an old BMP format, and your terminal may grab Ctrl+V for text.
WSL terminal
claude
Use Alt+V to paste an image on Windows and WSL (Ctrl+V is also bound on WSL). If the clipboard route still fails, save the image as a PNG and give Claude Code its file path or drag the file into the terminal.
Error loading shared library libstdc++.so.6: No such file or directory
Cause: On Alpine and other musl distributions the minimal image lacks the C++ runtime Claude Code needs. (On a glibc system, the cause can instead be a musl binary installed by mistake.)
Install the packages, then set USE_BUILTIN_RIPGREP to 0 in the env block of ~/.claude/settings.json so it uses the system ripgrep. The second command shows whether you are on glibc or musl. If apk cannot find ripgrep, add the Alpine community repository.
Most "it installed but will not work" reports are login problems. Three rules cover nearly all of them:
An API key wins. If ANTHROPIC_API_KEY is set in your shell, Claude Code asks once whether to use it, and from then on bills the API instead of your subscription. Unset it if you meant to use your plan.
Reset a stuck login with /logout, then /login. Run /status to see which account and billing route is active.
Over SSH or in a container, the browser cannot open on the remote machine. Copy the login URL into a local browser and paste the code back.
The free claude.ai plan does not include Claude Code access.
Native installs update themselves in the background; run claude update to update now. Homebrew, WinGet and Linux package installs do not auto-update: use brew upgrade claude-code, winget upgrade Anthropic.ClaudeCode, or your package manager. Run claude doctor to see your version and the last update result.
When a release breaks something, pin. Install an exact version, slow the channel down, or stop updates while you wait for a fix:
Swap in any earlier version number to roll back. Auto-updates resume unless you also stop them.
you must downgrade your version now to login
pixel_popping · Hacker News · Apr 2026, during a login regression
How do I uninstall Claude Code?
Short answer
Remove it the same way you installed it: delete ~/.local/bin/claude and ~/.local/share/claude for native installs, or run brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode, or npm uninstall -g @anthropic-ai/claude-code. Delete ~/.claude and ~/.claude.json too, but only if you also want your settings and history gone.
Optional: also delete settings, history and MCP config
$ rm -rf ~/.claude ~/.claude.json
Your first hour after install
Run /init in your project. It writes a CLAUDE.md with the build commands and layout. Keep it short: every line is read on every turn.
Run /context to see what fills the window. Heavy MCP servers and copied-in CLAUDE.md files are the usual culprits; the MCP servers worth adding to Claude Code page lists what each one costs.
Install the CLI tools you want it to use, such as ripgrep, pandoc or imagemagick, and say so in CLAUDE.md.
Set up safety once: the built-in sandbox, a separate OS user for risky projects, and min-release-age=7 in .npmrc so fresh packages wait a week.
Decide where memory lives. Claude Code forgets everything between sessions. CLAUDE.md covers project rules; for personal memory across projects, a local memory MCP such as Locul fills the gap.
Since Claude Code uses a 1 hour prompt cache window for the main agent
bcherny, Claude Code team · Hacker News · Apr 2026. Sessions left idle longer than an hour start cold.
Highly encourage people having issues to do /context and start removing heavy things.
No. The native installer ships one binary. Only the npm route uses Node.js, and it asks for version 22 or newer; on older versions npm prints a warning and still installs.
Should I use WSL or native Windows?
Native if you just want it working today. WSL2 if your projects live in Linux or you want the built-in sandbox, which only runs there.
Why does it say "claude: command not found"?
Your shell has not picked up ~/.local/bin. Open a new terminal; if that fails, add the folder to PATH. The first card in the error finder has the exact line.
Why does login time out?
Usually DNS: auth.anthropic.com does not resolve behind some VPNs and filtering resolvers. Check with nslookup auth.anthropic.com.
How do I stop or restart Claude Code?
Press Esc to stop the current step, Ctrl+C twice to quit. Run claude --continue to pick up the last session.
Is Claude Code down, or is it me?
Check status.anthropic.com first. If it is green, run claude doctor and look for your error in the finder.
Can I install it without admin rights?
Yes. The native installer writes only to your home folder.