A friendly, step-by-step guide to installing Claude Code on your machine. No prior command-line experience required. From zero to your first AI-assisted coding session in under 5 minutes.
March 2026 · By Richard Gamarra
macOS 13 Ventura or later
Ubuntu 20.04+ or Debian 10+
Windows 10 (v1809+) + Git for Windows
4 GB min · 8 GB recommended
Always-on connection required
AI runs on Anthropic's servers
Windows users: Install Git for Windows first, since the Claude Code installer requires it. Just run the installer with default settings.
Claude Code is free to install but requires a paid Anthropic account to authenticate. Pick the plan that fits your workflow:
Sign up or log in at claude.ai. The free plan does not include Claude Code access.
The native installer requires zero dependencies (no Node.js needed) and auto-updates in the background. Choose your OS:
Open Terminal (Cmd+Space → type "Terminal") and paste:
# Install Claude Code (one command) curl -fsSL https://claude.ai/install.sh | bash
Alternatively, if you use Homebrew: brew install claude-code (note: Homebrew won't auto-update)
Open your terminal and run:
# Install Claude Code (works on Ubuntu, Debian, and most distros) curl -fsSL https://claude.ai/install.sh | bash
Alpine Linux users: install libgcc libstdc++ ripgrep first and set USE_BUILTIN_RIPGREP=0
First: install Git for Windows, then open PowerShell and run:
# Install Claude Code via PowerShell irm https://claude.ai/install.ps1 | iex
WSL users can also use the Linux command above inside their WSL terminal.
Verify the install: after installation completes, run claude --version to confirm it's working. You should see a version number printed.
claude commandIn your terminal, navigate to any folder and simply type claude. On first launch it will open your browser automatically.
claude
Your default browser opens a Claude.ai sign-in page. Log in with your Anthropic account (the one you created in Step 2). Click Authorize when prompted.
Your terminal will show the Claude Code prompt. Authentication is saved, so you won't need to log in again unless you explicitly log out.
CI/CD or headless? Set ANTHROPIC_API_KEY=your_key as an environment variable instead of browser login.
Claude Code works inside your project folder. Navigate to a project with cd my-project and start chatting naturally:
Generates a CLAUDE.md file that gives Claude context about your codebase. Run this first!
Type "Explain what app.js does" and Claude reads your file and explains it plainly.
Type "There's a crash in login.py, can you fix it?" Claude edits the file directly.
Run this from your terminal at any time to check your environment and authentication status.
Type "Commit my changes with a good message" and Claude handles git for you.
Use the /bug command inside Claude Code to report problems directly to Anthropic.
/init firstThis creates a CLAUDE.md file in your project root. It's the most important post-install step because it gives Claude persistent context about your codebase, coding style, and conventions.
No special syntax needed. Write naturally: "Refactor this function to be more readable" or "Write unit tests for the auth module."
The native installer keeps Claude Code up to date silently in the background. No manual npm update needed. (Homebrew users must run brew upgrade claude-code manually.)
Install the Claude Code extension from the VS Code Marketplace or JetBrains Plugin Hub. It connects to the same CLI you just installed, no extra setup.