Module 2Installation & First Contact · 6 min

Installing Claude Code (Mac, Linux, Windows)

Claude Code installs as a global npm package and runs in any terminal. You need Node.js 18+ and either an Anthropic API key or a Claude Max subscription.

terminal

Two authentication modes

  • API key: set ANTHROPIC_API_KEY in your shell profile. Billed per token.
  • Claude Max: run `claude auth login` — uses your subscription, no separate billing.
  • Max is the better choice if you already have a subscription (unlimited usage within plan limits).

Platform notes

  • macOS / Linux: install as above, works out of the box
  • Windows: use WSL2 (Windows Subsystem for Linux) for the best experience
  • Add to .zshrc or .bashrc: export ANTHROPIC_API_KEY='your-key-here'

Tip

Run `claude doctor` after installation to verify everything is configured correctly. It checks Node version, auth state, and permission settings.

You're reading a free sample

Get the full course — all 67 lessons

Hooks, MCP servers, custom skills, multi-agent workflows, and three real projects you ship end to end.

Enroll now — instant access