# For a Claude Code install CLI users can follow the official setup commands

> For a Claude Code install terminal users can choose a native installer. The Claude Code install npm method requires Node.js 22 or later.

Source: https://ailoot.ai/blog/en/install-claude-code/
Canonical: https://ailoot.ai/blog/en/install-claude-code/
Language: en
Publisher: Ailoot (https://ailoot.ai/)
Translation: guide-150
Revision: sha256-d8e2d2e8dba96dd40d1c4323991dd9695f4f8c91c042184c1f076817c3d063a3


<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Claude Code installs in the terminal with a single command. Below: where to find the official Claude Code website, what exactly to download, how to install it on macOS, Windows, and Linux, how to launch it for the first time and sign in to your account. Plus what to do if the `claude` command can't be found.

</div>



<div class="aside" data-semantic="ailoot-docs-link" role="note" aria-label="Ailoot documentation">

[Ailoot documentation](https://ailoot.ai/docs/) describes connecting models and working with the API.

</div>

## What is the Claude Code CLI, and why use it in the terminal? {#what-is-claude-code-and-why-is-it-in-the-terminal}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Claude Code is an Anthropic tool that runs right in your computer's terminal. It can see your entire project, edit files, run commands, and handle whole tasks, while you tell it what to do in ordinary words in your preferred language. Unlike the chat at claude.ai, which is locked in a browser, Claude Code has access to your files and code.

</div>

The terminal scares almost everyone who gets into vibe coding without a software development background. It looks like a black window from hacker movies, but in reality it's just a line where you type commands. Claude Code needs it precisely so it can open your files, change them, and run checks by itself while you describe the task in words.

Anthropic describes the product this way.

<figure>
<blockquote>
<p>Claude Code is an agentic coding tool that lives right in your terminal, understands your code, and speeds up your work: it takes on routine tasks, explains complex areas, and handles git processes—all with ordinary commands in human language.</p>
</blockquote>
<figcaption>— Anthropic, https://github.com/anthropics/claude-code</figcaption>
</figure>

The difference from a familiar chat is simple. In a browser, you copy code by hand, back and forth between the window and your editor. Claude Code goes into the project folder itself, reads the files it needs, makes the change, and shows you what it changed. You remain the one who decides and approves; it does the mechanical work for you.

If you really don't want to use the terminal, Anthropic has a desktop app with a regular window and a web version at `claude.ai/code` that runs right in the browser. But the most powerful and flexible option is the terminal version, which is what this whole article is about.

## Where is the official Claude Code download, and how does installation work? {#where-is-the-official-claude-code-website-and-what-should-you-download}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

The official product page is `claude.com/product/claude-code`. The product website, with pricing and demos, is `code.claude.com`; the documentation is also there at `code.claude.com/docs`. But there is no familiar “download a file from the website” option here: Claude Code is installed with a terminal command that downloads the program you need. The only official npm package is called `@anthropic-ai/claude-code`.

</div>

The first point of confusion for beginners is where the official Claude Code website is and what to click to download it. Here's a table of all the official Anthropic addresses, so you don't have to guess.

| Address | What it is |
|----|----|
| `claude.com/product/claude-code` | Product page: description and installation links |
| `code.claude.com` | Product website: demos, pricing, details |
| `code.claude.com/docs` | Official documentation: installation, first launch, errors |
| `claude.ai/code` | Web version of Claude Code right in your browser |
| `github.com/anthropics/claude-code` | Official repository |
| `@anthropic-ai/claude-code` | Official npm package |

You don't download an installer from the website as you would for a regular program, which goes against what people expect. You install it with a terminal command, which then downloads the right version for your system. This article has the exact commands for Mac, Windows, and Linux.

One common trap is the name: people often misspell it as `clode code`, `clade code`, `слод код`, or `clode design`. The product is called **Claude Code**, with `au`. Keep that in mind when looking for the official website: domains with similar spellings belong to someone else.

It's also worth knowing the exact npm package name. The canonical package is `@anthropic-ai/claude-code`, with the `@anthropic-ai/` prefix. Anthropic itself holds the short name `claude-code` without the prefix—it is their official pointer to the same package. The simple rule: the publisher should be Anthropic, and the name to use for installation has the prefix.

## For a Claude Code install Ubuntu and Debian have which system requirements? {#what-you-need-to-install-it-computer-requirements}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Claude Code runs on macOS 13 and later, Windows 10 and later (directly or through WSL), and most Linux distributions. You need 4 GB of RAM, an internet connection, and any terminal. Node.js is required for only one of several installation methods—it isn't needed at all for the native installer.

</div>

Claude Code's requirements are modest: Anthropic's servers do the heavy work; your machine only sends requests and receives responses.

| What | Requirement |
|-----------|---------------------------------------------------------------|
| macOS | 13.0 and later |
| Windows | 10 (build 1809) and later, directly or through WSL |
| Linux | Ubuntu 20.04+, Debian 10+, Alpine 3.19+ |
| Memory | 4 GB or more (about 512 MB of free space is enough for the installation itself) |
| Processor | x64 or ARM64 |
| Network | Constant internet access |
| Shell | Bash, Zsh, PowerShell, or CMD |

A separate note about Node.js, since it's surrounded by the most myths. The native installer—the one Anthropic itself recommends—doesn't need Node.js at all: it installs as a single standalone file. Node.js is only required if you install Claude Code through npm, and then you need version 22 or later. Older articles say “Node 18 and above”—that's outdated; use 22+ as your guide.

You need a terminal for the main version. If you don't want to use one, install the desktop app with its regular window or use the web version at `claude.ai/code`. The terminal version is still more powerful in terms of features, so the rest of this article explains how to install that one.





## For a Claude Code install macOS offers the native installer and Homebrew {#how-do-you-install-claude-code-on-macos}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

On a Mac, the easiest way to install Claude Code is with the native installer: one terminal command, and it updates itself in the background from then on. Node.js isn't needed. If you use Homebrew, you can install it that way. Both methods install the same program; the only difference is who handles updates.

</div>

Open Terminal (it comes with every Mac: press `Cmd+Space` in Spotlight, type “Terminal”) and paste this one line:

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

The command downloads the installer from Anthropic's official address and installs Claude Code. Node.js isn't needed. The native method is also convenient because of its updates.

<figure>
<blockquote>
<p>The native installation updates itself in the background and keeps you on the latest version.</p>
</blockquote>
<figcaption>— Anthropic, Claude Code documentation, https://code.claude.com/docs/en/setup</figcaption>
</figure>

If you already use Homebrew, there's a second option:

```bash
brew install --cask claude-code
```

The difference between them is how updates work: the native installer updates itself, while Homebrew doesn't—you'll need to update it manually with the `brew upgrade claude-code` command. The program itself is the same, so choose whichever method you're used to. If you're not sure, use the first one.

## For a Claude Code install Windows PowerShell provides which native command? {#how-do-you-install-claude-code-on-windows}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

On Windows 10 and later, Claude Code installs natively, without Node.js. The command depends on your shell: PowerShell uses one, and Command Prompt uses another—they're easy to mix up, and beginners often make this mistake. You can also install through WinGet. It's a good idea to install Git for Windows in advance for the full experience.

</div>

First, figure out where you are. Windows has two shells, and each has its own command. Open a window and look at the start of the prompt: `PS C:\>` means PowerShell, while just `C:\>` without `PS` means Command Prompt (CMD).

For PowerShell (it's easiest to open it by right-clicking the Start button and choosing “Terminal”):

```powershell
irm https://claude.ai/install.ps1 | iex
```

For Command Prompt (CMD):

```batch
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```

There's a third option, using the built-in WinGet package manager:

```powershell
winget install Anthropic.ClaudeCode
```

<div class="aside" data-semantic="callout" role="note" aria-label="Tip">

Tip

Anthropic recommends installing Git for Windows in advance. That way, Claude Code can use Bash for its commands. Without it, Claude Code works through PowerShell, but many things run more smoothly with Git.

</div>

If you already have a working environment in WSL (Linux inside Windows), install Claude Code right inside WSL using the same command as on Linux. There's a separate WSL wrinkle involving Node, which I'll cover below in the common errors section.

## For a Claude Code install Linux supports the native installer and package repositories {#how-do-you-install-claude-code-on-linux}

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

The same native installer works on Ubuntu, Debian, Fedora, and Alpine as on Mac: one command, and it handles the rest. If you prefer to keep everything in the system package manager, Anthropic has signed apt, dnf, and apk repositories. Installation can fail on a low-memory server; if that happens, you'll need swap.

</div>

The basic method for any popular distribution is the same standalone installer:

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

Node.js isn't required; the program comes as a single file and updates itself from then on.

If you're used to installing programs only through the system package manager, you can add Anthropic's official repositories: apt for Debian and Ubuntu, dnf for Fedora and RHEL, and apk for Alpine. They're signed with a key and have stable and latest channels. That's overkill for a beginner, so I'm leaving the details to the documentation in the sources section and recommending the command above by default.

There can be one snag on inexpensive servers. If the machine has very little free memory, installation may stop with the word `Killed` (code 137)—the system killed the process because it ran out of memory. The fix is to add a swap file: Claude Code needs about 512 MB of free memory to install.

## How do you launch Claude Code for the first time?

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Go to your project folder, type `claude`, and press Enter—the interactive session opens right in the terminal. The first time it launches, Claude Code opens a browser so you can sign in to your account. Then you can ask your first question about the project in plain words, and it will give you a useful answer.

</div>

The first launch takes a couple of minutes. Here's the process.

1.  ### Go to the project folder

    In the terminal, use the `cd path-to-project` command to go to the folder you want to work with, then type `claude`.

2.  ### Sign in to your account

    A browser will open with a sign-in window. If it doesn't open automatically, press `c` to copy the link and paste it into a browser manually. If the browser displays a code (this can happen in WSL and on remote servers), paste that code back into the terminal.

3.  ### Wait for confirmation

    Once you're signed in, the terminal will display `Login successful` and ask you to press Enter.

4.  ### Ask your first question

    Ask something simple about the project, such as “what does this project do?” Claude will read the files and answer.

5.  ### Approve the first change

    When you ask it to change something, Claude will show you the proposed changes and ask for confirmation. You can switch access modes with `Shift+Tab`.

It's worth learning a few basic commands inside the session right away: `/help` lists the commands, `/clear` clears the conversation history, and `/exit` exits (double `Ctrl+D` does the same). Claude will show you all of this itself if you type `/help`.

## Sign in with a subscription or an API key: which should you choose?

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Claude Code doesn't work with the free Claude.ai plan. You need either a paid subscription account (Pro, Max, Team, or Enterprise) with a fixed monthly price, or an API key from Claude Console, where you pay for actual usage. For most business owners, a subscription is simpler and more predictable: pay once a month without counting tokens.

</div>

This is the first question that comes up when signing in.

<figure>
<blockquote>
<p>You need a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan doesn't provide access to Claude Code.</p>
</blockquote>
<figcaption>— Anthropic, Claude Code documentation, https://code.claude.com/docs/en/setup</figcaption>
</figure>

There are two ways to sign in, and they differ in how you pay.

| Sign-in method | How you pay | Who it's for |
|----|----|----|
| Claude.ai subscription (Pro / Max / Team / Enterprise) | Fixed monthly amount | Most people: predictable, sign in with your Claude.ai account |
| Claude Console (API key) | Pay for actual usage | People who want to pay strictly for usage and track their spending |

To sign in with a subscription, simply use your Claude.ai account. To sign in with an API key, get a key from Claude Console (`platform.claude.com`); charges are deducted from your prepaid balance as you work. Set the key in the `ANTHROPIC_API_KEY` environment variable, and Claude Code won't open the browser every time.

You can switch accounts within a session with `/login` and sign out with `/logout`.

But Claude Code won't launch without paid access. If you don't have an account yet, first find out [which email address to use to register](https://ailoot.ai/blog/en/claude-registration-email/): you can't change it later.

## How do you check that everything installed correctly?

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

A quick check is the `claude --version` command: a working installation prints a number like “2.1.211 (Claude Code)”. If something went wrong, `claude doctor` will diagnose the installation and settings without starting a session and suggest what to fix. Inside a session, `/status` shows which account you signed in with and whether access is active.

</div>

There are three commands worth knowing from the start.

The first checks the version:

```bash
claude --version
```

A working installation responds with a number in the format `X.Y.Z (Claude Code)`. The specific digits change from version to version; the important thing is that the command returns a version number at all. A “command not found” response means something else—I'll cover it in the next section.

The second is diagnostics, if something goes wrong.

<figure>
<blockquote>
<p>claude doctor displays installation and settings diagnostics without starting a session: it checks the health of the installation, looks for errors in settings files, and gives warnings with suggestions for what to fix.</p>
</blockquote>
<figcaption>— Anthropic, Claude Code documentation, https://code.claude.com/docs/en/setup</figcaption>
</figure>

The third is `/status` inside a session: it shows how you signed in, which email or organization is linked, and whether your access has expired. And `claude update` applies the latest update immediately instead of waiting for the background update.

## Why can't the claude command be found after installation?

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

If the terminal says “command not found: claude” or “'claude' is not recognized” after installation, that means the installation succeeded but the folder containing the program wasn't added to PATH—the list of places where the terminal looks for commands. The program is located in `~/.local/bin`. The fix is one line in your shell settings and a terminal restart.

</div>

This is the most common complaint from beginners, and it sounds scarier than it is. The terminal doesn't search the entire computer for commands; it only checks the folders in PATH. Claude Code puts itself at `~/.local/bin/claude` (on Mac and Linux) or `%USERPROFILE%\\.local\\bin\\claude.exe` (on Windows), and if that folder isn't in PATH, the terminal simply can't see the program.

On Mac and Linux, add the folder to the list. Open your shell's settings file (`~/.zshrc` for Zsh, `~/.bashrc` for Bash) and add this line at the end:

```bash
export PATH="$HOME/.local/bin:$PATH"
```

Then close and reopen the terminal (or run `source ~/.zshrc`). After that, `claude` will be found.

<div class="aside" data-semantic="callout" role="note" aria-label="Warning">

Warning

There's another pitfall: the Claude Code extension for VS Code puts its own copy of the program inside the extension folder and doesn't add it to PATH. So if you install only the extension, the `claude` command won't work in the terminal—you need to install Claude Code separately for the terminal, using the command in this article.

</div>

## Common installation and first-launch errors

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Apart from a missing PATH entry, five things most often trip up beginners: an old Node version for an npm installation, the wrong installer for their shell, an API key still set in the environment, insufficient memory on a weak server, and service unavailability from their region. The first thing to try with any problem is `claude doctor`—it can diagnose most cases on its own.

</div>

Let's go through them in order; all are from Anthropic's official troubleshooting guide.

1.  **Old Node when installing through npm.** The `@anthropic-ai/claude-code` package requires Node.js 22 or later. On Windows, npm may fail with a message about scripts being disabled—PowerShell's policy is blocking them from running. In WSL, a common error is `exec: node: not found`: WSL is using Windows Node instead of Linux Node. If npm is giving you trouble, switch to the native installer; it doesn't need Node.
2.  **Wrong installer for the shell.** `'irm' is not recognized` means you pasted a PowerShell command into Command Prompt. `The token '&&' is not a valid statement separator` means you did the opposite and ran a CMD command in PowerShell. `A parameter cannot be found that matches parameter name 'fsSL'` means you ran the Mac/Linux command in PowerShell. Check the start of the prompt: `PS C:\` is PowerShell, and `C:\` is CMD.
3.  **An old API key overrides the subscription.** If your subscription is active but an old key is still set in your environment, you'll see `API Error: 400 ... This organization has been disabled`. The key takes precedence over subscription sign-in. Remove it with `unset ANTHROPIC_API_KEY` (in PowerShell, use `Remove-Item Env:ANTHROPIC_API_KEY`), check `~/.zshrc` and `~/.bashrc`, then type `/status`.
4.  **Insufficient memory on a weak server.** Installation stops with the word `Killed` and code 137—that means there isn't enough RAM. You need about 512 MB free; adding swap fixes it.
5.  **The installer returned something else.** The error `syntax error near unexpected token '<'` or a reference to `<!DOCTYPE html>` means the installation URL returned a web page instead of the installation script—usually because of your region, a corporate firewall, or a temporary outage. Try another method (Homebrew, WinGet) or try again in a few minutes.

For any of these errors, the first step is the same: run `claude doctor`. It will show what's broken and suggest where to look.

There's a diagnostic wrinkle here: a bare `403` during installation can also come from a corporate firewall or proxy. So if you're on an office network, first check whether it's blocking access.

## What to do after installation: first steps

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Claude Code is installed—and yet every new conversation still starts from scratch, remembering neither you nor the project. The first step after installation is to put a `CLAUDE.md` file with rules and context in your project, so you don't have to explain the same things again. I cover how to customize Claude separately.

</div>

Installation is just the beginning. The real work starts next, and the first thing people run into is memory. A language model doesn't remember you between conversations: in a new chat, it knows only what you've put in its context.

So the first real step after installation is to create a `CLAUDE.md` file in your project's root. It's a text file with project rules and context that Claude Code reads every time it launches. Describe once what you do, how the project is organized, and what matters—and you won't have to repeat it in every conversation.

I walk through how to put that file together and customize Claude in a separate guide: [how to customize Claude](https://ailoot.ai/blog/en/claude-personalization-profile-memory/). I also put together [a general map of vibe-coding tools for 2026](https://ailoot.ai/blog/en/ai-coding-tools/).

## What else do people ask?

<div class="aside" data-semantic="key-takeaway" role="note" aria-label="Key takeaway">

Key takeaway

Six questions come up most often: do you need to know how to program, is Node.js required, how is Claude Code different from a regular chat at claude.ai, can you use it without a terminal, how much does it cost, and how do you update the program? I answer each one briefly and directly below.

</div>

<div class="section">

### Frequently asked questions

Do you need to know how to program to install Claude Code?

No. Installation takes a few commands that you copy from the instructions and paste into the terminal. You don't need to know how to program for this or to give Claude tasks in plain words afterward.

Is Node.js required for Claude Code?

Only for an npm installation—in that case, you need Node.js 22 or later. The native installer (the command with install.sh or install.ps1), Homebrew, and WinGet install the ready-to-use program as a single file, and don't require Node.js.

How is Claude Code different from the chat at claude.ai?

It has access to your computer. The browser chat responds with text, and you move the code by hand. Claude Code runs in the terminal, reads and edits project files itself, runs commands, and shows you what it changed.

Can you use it without a terminal?

Yes. Anthropic has a desktop app with a regular window and a web version at claude.ai/code that runs in the browser. The terminal version still has the full set of features.

How much does Claude Code cost?

There is no free access: you need a Claude.ai subscription (Pro, Max, Team, or Enterprise) with a fixed monthly price, or a Claude Console API key with pay-as-you-go billing. 

How do you update Claude Code?

The native installation updates itself in the background, and the `claude update` command applies an update immediately. Homebrew, WinGet, and npm update manually: use `brew upgrade claude-code`, `winget upgrade Anthropic.ClaudeCode`, or reinstall the package with the @latest suffix.

</div>

<div class="section" role="doc-bibliography" aria-label="Sources">

### Sources

- [Claude Code Docs - Overview](https://code.claude.com/docs/en/overview)
- [Claude Code Docs - Quickstart](https://code.claude.com/docs/en/quickstart)
- [Claude Code Docs - Advanced setup (installation, requirements, updates, verification)](https://code.claude.com/docs/en/setup)
- [Claude Code Docs - Authentication (sign-in, subscription vs. Console)](https://code.claude.com/docs/en/authentication)
- [Claude Code Docs - Troubleshoot installation (troubleshooting guide)](https://code.claude.com/docs/en/troubleshoot-install)
- [Claude Code Docs - Terminal guide (for people who haven't used the terminal)](https://code.claude.com/docs/en/terminal-guide)
- [Anthropic - official Claude Code product page](https://claude.com/product/claude-code)
- [Anthropic - official Claude Code repository on GitHub](https://github.com/anthropics/claude-code)
- [npm - @anthropic-ai/claude-code package](https://www.npmjs.com/package/@anthropic-ai/claude-code)
- [Anthropic - list of supported countries](https://www.anthropic.com/supported-countries)
- [Claude Console (API billing)](https://platform.claude.com/)
- [Claude Code in the browser](https://claude.ai/code)
- [Claude Code Docs - installation in VS Code](https://code.claude.com/docs/en/vs-code)
- [Claude Code Docs - JetBrains plugin](https://code.claude.com/docs/en/jetbrains)

</div>





<div class="aside" data-semantic="ailoot-link" role="note" aria-label="Ailoot">

Continue working with AI in [Ailoot](https://ailoot.ai/).

</div>


## Questions about How to install Claude Code from the official website

### Do I need Node.js for the native Claude Code installer?

No. The native installer installs the standalone program. Node.js is needed for the npm installation method; choose the instructions matching your operating system and shell.

### How do I distinguish a successful installation from a sign-in problem?

Run `claude --version` to check that the terminal finds the program. Then inspect `/status` inside a session for account access, and use `claude doctor` to investigate installation or configuration errors.


## Ailoot · The company and its project portfolio

Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.

The company and its project portfolio: millions of customers; monthly sales in the billions.

Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
