Getting Started: Install & Auth
Product facts change. Install commands, plans, prices and usage limits move often. This lesson states them as of October 2026, so check the official install page and pricing page before you act on one.
After this lesson, you will be able to:
- Install Claude Code on macOS, Windows, or Linux with the method that suits your environment (native installer, Homebrew, WinGet, or npm)
- Authenticate with the right tier, Claude Pro, Max, API key, or enterprise (Bedrock/Vertex/Foundry), based on your usage pattern
- Verify your install with the canonical first-run check and resolve the 3 most common auth failures
- Configure shell integration so `claude` works as a first-class command from your terminal
A teammate runs claude --version after a fresh install and sees command not found. What is most likely wrong?
#Installation
| Platform | Command |
|---|---|
| macOS, Linux, WSL (native installer) | Run the one-line install command shown on the official install page |
| Windows (native installer) | Run the PowerShell command shown on the official install page |
| macOS (Homebrew) | brew install --cask claude-code |
| Windows (WinGet) | winget install Anthropic.ClaudeCode |
| Cross-platform (npm) | npm install -g @anthropic-ai/claude-code (needs Node.js) |
claude update checks for a new version.After install, verify:
claude --version
# prints the installed version number
#Authentication
Four kinds of sign-in, each with different tradeoffs. Plan names, prices and limits change, so the table says what each is for and leaves the numbers to the pricing page.
| Auth Type | Use For | Pros | Cons |
|---|---|---|---|
| Claude Pro (subscription) | Hobbyists, light daily use | Simple, no token math | Usage-limited at heavy use |
| Claude Max (subscription) | Heavy individual use | A much larger usage allowance than Pro | Pricey if you do not use it daily |
| API Key (pay-as-you-go) | Variable workloads | Full flexibility, charges per token | Need to monitor cost |
| Enterprise (Bedrock/Vertex/Foundry) | Companies, regulated industries | Compliance, audit logs, data residency | Setup overhead |
claude # Opens browser to claude.com for OAuth
For API key (CI/CD, scripted use):
export ANTHROPIC_API_KEY="sk-ant-api03-..."
claude
For Bedrock:
export CLAUDE_CODE_USE_BEDROCK=1
export AWS_REGION=us-east-1
claude
#First-Run Smoke Test
cd ~/your-project
claude
You should see the Claude Code prompt. Type:
List the files in this directory.
#Common Auth Failures
#Shell Integration
A short alias saves keystrokes. Add to your shell config:
# .zshrc / .bashrc
alias cc='claude'
alias ccc='claude --continue' # pick up the most recent conversation here
#Picking Your Tier
| Pattern | Best Tier |
|---|---|
| A few sessions a day, mostly small tasks | Pro |
| Heavy daily use, long sessions | Max |
| Bursty: 200 queries one day, zero for weeks | API key |
| Enterprise (compliance, audit, data residency) | Bedrock/Vertex/Foundry |
| CI/CD automation | API key |
You just installed Claude Code on a CI runner (no human at the keyboard). Which authentication path is correct?
#Key Takeaways
- Install with one method (native installer, Homebrew, WinGet or npm) so updates come from one place
- Pro for hobbyists, Max for power users, API for flexibility, enterprise for compliance
- Verify with
claude --versionthen a real query. Both must work before you trust the install - Common failures are PATH, OAuth callback, or expired tokens; each has a 30-second fix
- Shell aliases like
ccsave thousands of keystrokes over months of use
#Quick Check
You're a freelance developer using Claude Code 4-6 hours/day across multiple client projects. Best tier?