The Complete Claude Guide
← Back to topic
Chapter 01 · CLI

Installing, authenticating and updating Claude Code

Claude Code is a command-line tool that brings Claude into your terminal and project. A correct install, signing in to the intended account and understanding the billing paths (subscription vs API vs cloud provider) are the foundation for everything else.

Verified against source on 2026-09-30

Video

Install, identify the account, then stop before coding

You will verify installation and authentication without giving access to a real repository. Examples are expected shapes, not filmed execution.

Claude Code CLI is different from Claude Chat and the Desktop Code interface. Sources checked September 30, 2026 describe subscription login, Console/API billing and supported provider routes. An existing chat login does not prove the terminal uses the same account or billing route.

Choose the official installation route

Open the official quickstart and setup sources. Choose instructions for your operating system and existing package manager. The native installer is recommended and updates automatically; Homebrew and WinGet require their respective upgrade commands. Do not combine installation methods casually.

For macOS, Linux or WSL the quickstart currently lists:

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

For Windows PowerShell it lists:

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

These commands download and execute installer code. Read the official page, check the domain and follow workplace policy before running. Do not use an unfamiliar mirrored script. Native Windows may use Bash through Git for Windows or PowerShell when Git is absent according to the current guide; WSL is a separate environment.

Verify the executable
claude --version
claude --help

Check that the installed command is found and help opens. A version number is not proof that every documented feature exists in that release. Avoid copying a fixed version number from a lesson as the current version.

If command lookup fails, inspect installer output and PATH using the troubleshooting source. Do not repeatedly reinstall into unrelated system folders.

Authenticate through the selected route

Start claude in a harmless practice directory. Read the offered account method. Subscription access and Console prepaid/API access have different billing. An existing ANTHROPIC_API_KEY environment setting can cause key approval instead of ordinary browser login. Never paste a key into chat or a repository.

For browser login, use the displayed URL. If the browser supplies a code because the callback cannot reach the terminal, use that actual code at the displayed prompt. Never guess a code from a URL fragment.

Illustrative completion:

Login successful
[Continue prompt in the terminal]

Inspect account identity and route. /login can change authentication inside a session; do not switch blindly between work and personal organizations.

One read-only readiness request
This is a setup check only.
Explain which directory this session is in and whether you can read the practice files.
Do not edit, install, connect services, access the network or run project scripts.
Do not display environment variables or credentials.

Confirm the intended directory. Authentication success is not authorization for arbitrary filesystem access or spending. The exercise ends before a coding task.

Graded practice

Easy: command availability

Run version and help. Success: installed executable and recognizable help without a purchase.

Intermediate: identity and billing

Identify subscription versus Console/provider route. Success: no assumption that chat billing covers API usage.

Challenging: diagnose one setup problem

Match an observed PATH or callback error to official troubleshooting. Success: a specific fix instead of repeated guesses.

Troubleshooting and updates

HTML instead of installer: stop and inspect the actual download error/domain; do not run the response blindly.

Browser return fails: follow the actual provider code/callback instructions.

Wrong organization: stop before project access and select intended identity.

Usage prompt: read the billing route; do not enable paid extras merely to complete practice.

Updates: use the route matching your installation. Native and package-manager update behavior differ.

Filmed demo · Video is added in the media phase

Recap

Comprehension check

What do you check when installing Claude Code for the first time?

Recap

Sources and further reading

← Previous Back to topic Next →