Time: 2 min · Goal: Run
claudefrom your terminal.
You need a paid Claude plan to use Claude Code. The free Claude.ai plan does not include it. Any one of these works:
- Claude Pro / Max / Team / Enterprise – sign up at claude.com/pricing. Recommended for individuals and most teams.
- Anthropic Console account with API credits – console.anthropic.com. Pay-as-you-go.
- Cloud provider (Bedrock / Vertex AI / Foundry) – usually for enterprise.
Plus:
- A terminal (see section 1).
- macOS 13+, Windows 10 (1809+), or Linux (Ubuntu 20+, Debian 10+, Alpine 3.19+).
- 4 GB+ RAM, internet connection.
Don't want to use a terminal at all? Download the Claude Desktop app – same agent in a regular app window, no terminal needed. The rest of this guide assumes the terminal version.
flowchart LR
A[Open your terminal] --> B[Paste 1 install command]
B --> C[Restart terminal]
C --> D[Type 'claude']
D --> E[Sign in via browser]
E --> F([Ready to use])
Recommended – native installer (auto-updates, no extras to install):
curl -fsSL https://claude.ai/install.sh | bashIf you use Homebrew:
brew install --cask claude-codeHomebrew installs do not auto-update. Run
brew upgrade claude-codeto get new versions.
Recommended – PowerShell native installer:
irm https://claude.ai/install.ps1 | iexIf PowerShell says "running scripts is disabled on this system", run this once and retry:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
For CMD users (not PowerShell):
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdNot sure which one you're in? PowerShell shows
PS C:\Users\You>; CMD showsC:\Users\You>(noPS).
If you use WinGet:
winget install Anthropic.ClaudeCodeRecommended on Windows: also install Git for Windows. Claude Code uses it for some shell features. Optional but smoother.
Same as Mac:
curl -fsSL https://claude.ai/install.sh | bashOr use the package manager for your distro – see the official guide for apt / dnf / apk repos.
Close the terminal window. Open a new one. (This makes sure your computer "sees" the new claude command.)
In the new terminal, type:
claudeWhat happens:
sequenceDiagram
participant You
participant Terminal as Terminal
participant Browser
You->>Terminal: claude
Terminal->>Browser: opens claude.ai login page
You->>Browser: sign in (Pro / Max / Team / Console)
Browser-->>Terminal: ✓ authenticated
Terminal-->>You: ◆ Welcome to Claude Code
A browser window opens. Sign in with your Claude account (the one with your paid plan). The browser sends a token back to the terminal. You only do this once per computer.
After signing in:
Terminal
~ $ claude
◆ Welcome to Claude Code
> _
The > is Claude waiting for you to type a question. You're installed and ready.
Press Ctrl+C to exit any time.
claude --version # should print a version number
claude doctor # deeper health check| What you see | What to do |
|---|---|
| Mac says "command not found: claude" | Close & reopen the terminal. Check which claude. |
| Windows says "claude is not recognized" | Close & reopen PowerShell. Sign out / sign in to Windows so the PATH refreshes. |
| Windows says "running scripts is disabled" | Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, then retry. |
| Windows says "'irm' is not recognized" | You're in CMD, not PowerShell – use the CMD command above. |
| The login keeps looping | Run claude logout, then claude again. |
| "Invalid plan" or no Code access | Your Claude.ai account is on the free plan. Upgrade to Pro/Max/Team or use a Console account. |
| Antivirus blocks the installer (Windows) | Allow it – the installer is signed by Anthropic. |
Still stuck? Official troubleshooting: code.claude.com/docs/en/troubleshoot-install.
Next: Set up a project →