How to install Claude Code

Install Anthropic's Claude Code on macOS, Linux, or Windows: native installer, Homebrew, or WinGet, plus login options and where it runs beyond the terminal.

Claude Code is Anthropic's agentic coding tool. It reads your codebase, plans and executes changes across files, runs tests, and iterates on failures from natural language prompts. Installation is simple compared to self-hosted agents; the choices worth understanding are the install channel and how you log in.

Prerequisites

  • A terminal.
  • A Claude subscription (Pro, Max, Team, or Enterprise), a Claude Console account, or access via Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.

Install

Native installer (recommended; auto-updates in the background):

macOS / Linux / WSL:

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

Windows PowerShell:

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

Windows CMD:

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

Homebrew:

brew install --cask claude-code

The claude-code cask tracks the stable channel (about a week behind, skips releases with major regressions); claude-code@latest tracks the latest channel. Homebrew installs do not auto-update, so run brew upgrade claude-code periodically.

WinGet:

winget install Anthropic.ClaudeCode

On native Windows, Git for Windows is recommended so Claude Code can use its Bash tool; without it, PowerShell is used instead. Debian, Fedora, RHEL, and Alpine users can also install via apt, dnf, or apk.

Log in and start

Start an interactive session from any project directory; you'll be prompted to log in on first use:

cd /path/to/your/project
claude

Authentication completes in your browser. To switch accounts later, type /login inside a session. Credentials are stored after the first login.

Beyond the terminal

Claude Code is no longer CLI-only. The same agent is available on the web (claude.ai/code), in the Claude desktop app, in VS Code and JetBrains IDEs, in Slack, and in CI via GitHub Actions and GitLab. The terminal remains the most capable surface, but the desktop app is the easiest entry point if you live outside the terminal.

Essential first commands

| Command | What it does | | --- | --- | | claude | Start interactive mode | | claude "task" | Run a one-time task | | claude -p "query" | One-off query, then exit | | claude -c | Continue the most recent conversation here | | /help | Show available commands |

Next steps

Source: Claude Code quickstart, checked June 2026.

Share:
Explore Claude CodeGuides