Claude Code in Practice / Start here

Install and verify Claude Code

Lesson 2 of 34. Open to read. No account needed.

Before Claude Code can do anything, it has to be installed, on your PATH and at a version you know. This lesson installs it with Anthropic's native installer, chooses how it updates, and checks the result with two commands that make no requests to Claude and cost nothing.

By the end you can:

  • install Claude Code and confirm which version you have;
  • choose the release channel that controls updates, and see it in effect;
  • diagnose the commonest installation problem, command not found.

Before you start

  • The readiness checks in How this course works are done, and Git and Python 3.12 or later are installed.
  • You can open a terminal: Terminal on macOS, your distribution's terminal on Linux, or a WSL2 terminal on Windows. On native Windows, PowerShell works for this lesson; later lessons say when you need WSL2.
  • You do not need to be signed in yet. Signing in is the next lesson.

If Claude Code is already installed, still do steps 3 and 4: they check the version and the update channel.

Ways to install, and how each updates

MethodCommand (summary)Updates itself?
Native installer (recommended)curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSLYes, in the background; takes effect the next time you start Claude Code
Homebrew (macOS)brew install --cask claude-codeNo, unless you opt in; upgrade with brew upgrade claude-code
WinGet (Windows)winget install Anthropic.ClaudeCodeNo, unless you opt in; upgrade with winget upgrade Anthropic.ClaudeCode
Linux package managers (apt, dnf, apk)See Anthropic's setup pageNo

The course uses the native installer. Whichever method you choose, you need to know whether it updates itself: a Homebrew install that you never upgrade stays at the version you installed while the course moves on.

Release channels

Native installations follow one of two release channels:

  • latest receives each new version as soon as it is released;
  • stable receives a version that is typically about a week old and skips releases with major regressions.

The course uses stable, because you want fewer surprises while you learn. The setting that controls it is autoUpdatesChannel in your user settings file, ~/.claude/settings.json (the ~ means your home folder). Settings files get a full lesson later; for now, this is one small JSON file.

Install and check Claude Code

1. Install on the stable channel

On macOS, Linux or WSL:

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

On Windows PowerShell:

& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) stable

The installer downloads Claude Code into your home folder; on macOS and Linux, the claude command lives at ~/.local/bin/claude. It needs no administrator rights. The command prints little while it downloads; wait for it to finish. Then open a new terminal window, so that your shell picks up any PATH change the installer made.

To install a specific version instead, for example the version the course was tested with, put the version number where stable is: bash -s 2.1.308.

2. Confirm the command is found

claude --version

Illustrative output:

2.1.308 (Claude Code)

The number is your installed version. Write it down; you will compare it with the course's tested version, 2.1.308. A newer version is normal. If your shell says command not found or not recognized, see When your result differs.

3. Set the release channel explicitly

Open ~/.claude/settings.json in your text editor. If the file does not exist, create it with exactly this content:

{
  "autoUpdatesChannel": "stable"
}

If it already exists, add the "autoUpdatesChannel": "stable" line inside the outer braces, with a comma separating it from the line before or after. Do not remove anything already there. JSON does not allow a trailing comma after the last entry.

Why set it when you installed from the stable channel? The installer records your choice, but checking it explicitly is cheap, and a later reinstall or a different configuration folder can leave you on latest without your noticing. In the author's test environment, which kept its configuration in a separate folder, claude doctor reported latest until the setting was added.

4. Check the installation's health

claude doctor

claude doctor checks the installation and your settings files without starting a session, so it makes no request to Claude. Illustrative output, shortened; your lines differ by platform and version:

Claude Code doctor

Running: native (2.1.308)          <- installation method and version
Platform: linux-arm64               <- your operating system and processor
Search: OK (bundled)                <- the file search tool Claude uses works
Auto-updates: enabled               <- whether updates install in the background
Auto-update channel: stable         <- the channel from your settings

Read three lines:

  • Running names the method (native here) and version.
  • Auto-updates should be enabled for a native installation. If it says disabled, the reason follows in brackets, such as an environment variable that turns updates off.
  • Auto-update channel should now say stable. If it still says latest, your settings file was not read: check its location and that it is valid JSON.

If claude doctor lists warnings, each comes with a suggested fix. A JSON error in a settings file appears here too.

What success shows

You have the evidence for this lesson when:

  • claude --version prints a version, ideally 2.1.308 or later;
  • claude doctor shows the native method, auto-updates enabled and the stable channel.

These show that the command is found, which version you will learn with, and that it will update on the schedule you chose. They do not show that you can sign in or use Claude yet; that is the next lesson.

When your result differs

What you seeWhat it meansSafe next step
command not found: claude or 'claude' is not recognizedThe install folder is not on your PATH, or the terminal was opened before the installOpen a new terminal first. If it still fails, run ls -la ~/.local/bin/claude; if the file exists, add ~/.local/bin to PATH (below)
The installer prints Native installation exists but ~/.local/bin is not in your PATHSame cause, reported by the installerAdd ~/.local/bin to PATH (below)
claude --version is older than 2.1.308An earlier installation, or a package-manager install that does not updateclaude doctor shows the method; run claude update for a native install, or upgrade through Homebrew or WinGet
claude doctor reports Auto-update channel: latestThe setting is missing, misspelled or in the wrong fileCheck ~/.claude/settings.json and the spelling autoUpdatesChannel
claude doctor reports a JSON error in a settings fileA typing mistake in the file, such as a trailing commaFix the file at the line it names
The install command fails with an HTML or 403 errorA network, proxy or regional problemFollow Anthropic's installation troubleshooting page; Claude Code works only in supported countries

To add ~/.local/bin to PATH, append one line to your shell's startup file, then open a new terminal. For Zsh (the macOS default):

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc

For Bash, use ~/.bashrc instead of ~/.zshrc. Run the command once only: each run adds another copy of the line.

Your turn

For each illustrative situation, name the cause and the next check before opening the solution.

  1. A colleague installed Claude Code with Homebrew two months ago and says lessons describe features they do not see. claude --version prints a much older version than yours.
  2. After installing, claude --version works in a new terminal, but in an old terminal tab it prints command not found.
  3. claude doctor shows Auto-update channel: latest even though ~/.claude/settings.json contains "autoUpdateChannel": "stable".

Solution

  1. Homebrew installs do not update themselves by default. The fix is brew upgrade claude-code, then claude --version to confirm. The version difference, not a mistake in the lesson, explains the missing features.
  2. The old tab started before the installer changed PATH. Close it or open a new one; nothing needs reinstalling.
  3. The key is misspelled: it is autoUpdatesChannel, with an s after Update. An unknown key is ignored, so the channel stays at its default.

Reset and cleanup

Keep Claude Code installed: every later lesson needs it. If you ever need to remove a native installation, follow the uninstall section of Anthropic's setup page rather than deleting files by hand, so that the launcher and its versions folder are removed together.

Check your understanding

  1. Which install methods update themselves by default, and why does that matter for this course?
  2. What is the difference between the stable and latest channels?
  3. Why are claude --version and claude doctor safe to run at any time?

Answers

  1. Only the native installer updates itself by default; Homebrew, WinGet and Linux package managers need a manual upgrade unless you opt in. Without updates you may fall behind the version the lessons describe.
  2. latest delivers each release immediately; stable delivers a version about a week old and skips releases with major regressions.
  3. They report on the installation and settings without starting a session or sending anything to Claude, so they change nothing and cost nothing.

29 more lessons in the full course

Course access opens every lesson and adds revision notes, the Quick Reference, saved progress, bookmarks and your own notes.

INR 199 plus 18% GST. 90 days of online access. No auto-renewal.

Get the full course

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy