How to Install Claude Code
A step-by-step guide to installing the Claude Code CLI on macOS, Windows, and Linux, through first run.
Updated Jul 6, 2026Beginner1 min read
Share
Prerequisites
- Node.js 20 or later
- Terminal (zsh / bash / PowerShell)
Install flow
flowchart TD
A[Check Node version] --> B{Node 20+?}
B -->|Yes| C[Global npm install]
B -->|No| D[Upgrade Node.js]
D --> C
C --> E[claude login]
E --> F[First run]
F --> G[Check version]Install command
macOS / Linux
bash
npm install -g @anthropic-ai/claude-code
claude --versionWindows (PowerShell)
plaintext
npm install -g @anthropic-ai/claude-code
claude --versionVerify installation
After installation, verify with:
bash
claude --versionOutput should be:
plaintext
claude-code/1.0.0First run
bash
claudeA login prompt appears. Enter your API key to proceed.