2.1 — Installation and first launch
Claude Code is an agent that works in your terminal. It reads your project, edits your files, and runs commands when you ask. This section takes you from installation to your first question.
Install Claude Code
On macOS, Linux, and WSL, the recommended method is a single command:
curl -fsSL https://claude.ai/install.sh | bash
On Windows, pick the command that matches your terminal:
# PowerShell
irm https://claude.ai/install.ps1 | iex
# CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Git for Windows is recommended but not required. Without it, Claude Code runs its commands with PowerShell.
You can also use a package manager:
brew install --cask claude-code # Homebrew
winget install Anthropic.ClaudeCode # WinGet, on Windows
The Homebrew cask claude-code tracks the stable channel, which runs about a week behind. The claude-code@latest cask gets each release as soon as it ships.
The native install updates itself in the background, and claude update runs the update right away. With Homebrew or WinGet, run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode yourself from time to time. The npm package @anthropic-ai/claude-code (Node.js 22 or later) still works, but the native installer remains the recommended method.
Check the installation
Open a new terminal and type:
claude --version
The command prints a version number followed by (Claude Code). If your shell can't find claude, the install folder is missing from your PATH. The "Troubleshoot installation" page of the docs gives the fix for each system.
For any other problem, run claude doctor. This command checks the installation and your settings without opening a session.
Launch your first session
cd /your/project
claude # opens an interactive session
claude "explain this project" # opens the session with a first question
Always launch Claude Code from your project folder, because it works in the current directory.
The first launch has three steps:
1. Sign-in. Claude Code asks you to sign in through your browser. You need a Pro, Max, Ultra, Team, or Enterprise subscription, or a Console account billed by API usage. The free claude.ai plan doesn't include Claude Code.
2. Trust. In a folder you've never worked in, Claude Code asks whether you trust that folder. Accept for your own projects. For a repository you don't know, look at what it contains first.
3. Prompt. The screen shows the version, the model, and the current folder, then waits for your request.
Claude Code stores your login, so you won't have to sign in again. The default model is Opus 5.5 on all of these plans, and the /model command lets you switch.
Basic moves
Type your request in plain English, then press Enter. Try "What does this project do?" for a start.
| Move | Key or command |
|---|---|
| Start a new line without sending | Shift+Enter, or \ then Enter in any terminal |
| Interrupt Claude | Escape or Ctrl+C |
| Clear your input | Ctrl+C when nothing is running |
| Quit | Ctrl+D twice, or /exit |
| See the available commands | /help |
Shift+Enter works out of the box in iTerm2, Ghostty, Kitty, WezTerm, Warp, and Windows Terminal 1.25 or later. In VS Code, Cursor, Alacritty, or Zed, run /terminal-setup once to enable it.
Key takeaways
• You install Claude Code with curl -fsSL https://claude.ai/install.sh | bash, then check with claude --version.
• You launch it from your project folder with cd /your/project && claude.
• You need a Pro, Max, Ultra, Team, or Enterprise subscription, or a Console account.
• On first launch, you sign in through the browser and confirm that you trust the folder.
• Shift+Enter starts a new line, Escape interrupts Claude, and Ctrl+D twice quits the session.
• claude doctor checks an installation that misbehaves.
