Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français
Lire en français

Install Claude Code CLI on Linux, macOS and Windows

10 min read
Improve this page

Claude Code logo - installation and first CLI launch

Claude Code CLI is installed with the official installer https://claude.ai/install.sh on Linux and macOS, or winget install Anthropic.ClaudeCode on Windows, then checked with claude --version and claude doctor. You will install it on your system, complete the first launch, then check that the command works before moving on to a full workflow. The goal is a reliable, reproducible base, without getting into advanced prompting or automation scenarios yet.

What you will learn

These four points cover the whole path between a blank system and a usable session. The last two matter as much as the first two: most of the blockages reported happen after the installation, during sign-in.

  • Install Claude Code CLI on Linux, macOS or Windows
  • Understand the normal screens of the first launch
  • Complete sign-in without getting stuck
  • Check the state of the CLI with diagnostic commands

Why take care of the installation before the first workflow

A badly installed CLI produces symptoms that look like usage problems: command not found, a session that will not open, a sign-in that loops. Treating them as prompting bugs wastes time, whereas three diagnostic commands identify them in a few seconds.

This guide is therefore for people starting with Claude Code CLI who want a clean base before moving to fuller workflows. It answers one simple question: how to install, sign in and check that everything works.

It does not yet cover how sessions work, advanced prompting or governance mechanisms. Those topics are handled in the guides that follow in the course.

Prerequisites

Three things are enough. The procedure below uses neither npm nor Node.js: the official installers of each platform put the claude binary directly in your PATH.

  • A local terminal (Bash, Zsh, PowerShell or equivalent)
  • An account or access compatible with Claude Code: Pro, Max, Team, Enterprise, Console, or a supported API provider
  • Internet access

Step 1: install Claude Code CLI

Pick the tab for your system. On Linux and macOS, the official script is downloaded, read, then run: three commands rather than a curl | bash that would blindly run whatever the network returns. On Windows, prefer WinGet, which installs a package listed in a manifest repository, over the irm … | iex form that runs a remote script directly.

Terminal window
# Download the official script, inspect it, then run it
curl -fsSL https://claude.ai/install.sh -o claude-install.sh
less claude-install.sh
bash claude-install.sh

Step 2: check the installation

Two commands are enough: claude --version confirms that the binary is in the PATH, claude doctor checks the environment around it. Always open a new terminal before running them: the one used for the installation does not know the updated PATH yet, and that is the number one cause of the famous claude: command not found.

  1. Open a new terminal (to reload the PATH)

  2. Check the version

    Terminal window
    claude --version
  3. Run the basic diagnostic

    Terminal window
    claude doctor

Step 3: get through the first launch

On the first claude, you will usually meet a visual setup sequence, then sign-in, before reaching a session ready to use.

Screen 1: visual setup

You land on a start screen that offers a display theme.

  • Use the arrow keys to choose
  • Press Enter to confirm
  • You can change this choice later

First launch of the CLI with the setup screen

Screen 2: account sign-in

The CLI then shows a sign-in URL (OAuth) and may ask for a validation code.

Recommended procedure:

  1. Copy the URL shown in the terminal
  2. Open it in your browser
  3. Sign in to your Claude account
  4. If a code is requested, go back to the terminal
  5. Paste the code then confirm with Enter

OAuth sign-in in the Claude Code CLI

Screen 3: session ready

When a "Welcome back" type of screen appears, the CLI is operational.

  • The > line lets you type your requests
  • The current folder shows the working context
  • You can run a first simple command to check the flow

Claude Code CLI ready to use

Step 4: a quick tour of the CLI

Once the CLI is operational, take 2 minutes to make three useful settings.

  1. Open the quick help

    In the CLI session, type ? to display the available shortcuts.

  2. Change the theme

    In the CLI session, type:

    /theme

    Choose a theme that is readable for you, then confirm.

  3. Switch the interface language

    Open the configuration:

    /config

    Then select the interface language if the option is available in your version.

At this stage, do not try to configure everything. The goal is simply to spot where the settings you will use next are located.

Recommended next step: start with the guide Claude Code CLI: create the lab-claude running project to set up a single practice ground, then continue with Claude Code CLI: getting started, commands and configuration.

Common errors

These three symptoms cover almost all installation blockages. The first two have nothing to do with Claude Code itself: one comes from the terminal's PATH, the other from the browser. Read the "Likely cause" column before applying the fix, it avoids treating one symptom for another.

SymptomLikely causeFix
claude: command not foundPATH not reloadedReopen the terminal, then retest
Sign-in loopsIncomplete browser sessionReuse the sign-in URL shown and finish the login
claude doctor reports warningsMissing local dependencyFix the blocking warnings first, then rerun

Key takeaways

Three points, and the last one is the one most often ignored: moving on to a complex workflow while the CLI is not stable produces symptoms that get blamed on the model, never on the installation.

  • A successful installation is always validated with claude --version then claude doctor
  • A first launch with theme + sign-in + final screen is normal behaviour
  • As long as the CLI is not stable, do not chain into complex workflows

Knowledge check

Check that you have the essentials of this guide. The questions cover only what was just explained here.

Knowledge check

Check what you have learned with this interactive quiz

6 questions
6 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer

FAQ: frequently asked questions

These short answers cover the points that come up most: installation under Windows and WSL, the claude: command not found message, checking the installation and the special case of npm.

Is this project useful to you?

The guides, courses, quizzes and labs stay free. If you use them regularly, you can contribute to their upkeep and development.

Become a supporting member (new tab) One-time support (new tab) Learn more

Follow the project on LinkedIn