How to Install Claude Code CLI on Windows, macOS, and Linux (Step-by-Step)

Claude Code is Anthropic’s command-line AI coding assistant. It runs directly in your terminal and helps you understand code, write features, fix bugs, and manage Git workflows using natural language. This guide explains exactly how to install Claude Code on Windows, macOS, and Linux with clear, direct steps.

How to Install Claude Code CLI on Windows, macOS, and Linux (Step-by-Step)
How to Install Claude Code CLI on Windows, macOS, and Linux (Step-by-Step)

System Requirements

Before installing, make sure your system meets these basics:

  • Operating system
    • macOS 13.0 or newer
    • Windows 10 (1809+) or Windows Server 2019+
    • Ubuntu 20.04+, Debian 10+, or Alpine Linux 3.19+
  • Memory: 4 GB RAM or more
  • Shell: Bash or Zsh works best
  • Internet: Required for login and usage
  • Location: Must be in an Anthropic-supported country

Recommended Installation Method (Native Installer)

The native installer is the fastest and most reliable option. It also keeps Claude Code updated automatically.

macOS, Linux, and WSL

curl -fsSL https://claude.ai/install.sh | bash

Windows (PowerShell)

irm https://claude.ai/install.ps1 | iex

Windows (Command Prompt)

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

After installation completes, move to any project folder and start Claude Code:

cd your-project
claude

Windows Setup Notes

You can run Claude Code on Windows in two supported ways:

  • WSL (recommended): Works with WSL 1 and WSL 2
    • WSL 2 supports better sandboxing and security
  • Git Bash (native Windows): Requires Git for Windows

If Git Bash is not detected automatically, set its path:

$env:CLAUDE_CODE_GIT_BASH_PATH="C:\Program Files\Git\bin\bash.exe"

How to Log In to Claude Code After Installation

Claude Code requires an account on first launch.

  1. Run:claude
  2. When prompted, log in using one of the following:
    • Claude Pro or Max plan
    • Claude Teams or Enterprise
    • Claude Console (with active billing)
    • Supported cloud providers (Amazon Bedrock, Google Vertex AI, Microsoft Foundry)

Claude stores credentials securely, so you don’t need to log in again.

How to Verify Claude Code Installation

After installing, confirm everything works correctly:

claude --version
claude doctor

claude doctor checks your setup, dependencies, and installation type.

Basic Usage

Start Claude Code in any project directory:

claude

You can now ask questions like:

  • “What does this project do?”
  • “Explain the folder structure”
  • “Where is the main entry point?”

Claude reads your files automatically and responds with context-aware answers.

Make Your First Code Change

Describe what you want in plain language:

add input validation to the login form

Claude Code:

  • Finds the correct files
  • Shows proposed changes
  • Waits for your approval
  • Applies edits safely

It never changes files without permission.

Useful Commands You Should Know

CommandWhat it does
claudeStart interactive mode
claude "task"Run a one-time task
claude -p "query"Ask a quick question and exit
claude commitCreate a Git commit
/helpShow available commands
/clearClear conversation history

Auto-Updates and Release Channels

Claude Code updates itself automatically when installed natively.

  • Latest (default): New features as soon as they release
  • Stable: Slightly older, fewer breaking changes

You can switch channels in settings:

{
  "autoUpdatesChannel": "stable"
}

To disable auto-updates:

export DISABLE_AUTOUPDATER=1

How to Uninstall Claude Code

macOS, Linux, WSL

rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

Windows (PowerShell)

Remove-Item "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item "$env:USERPROFILE\.local\share\claude" -Recurse -Force

What Makes Claude Code Popular Among Developers?

Claude Code works like an AI pair programmer in your terminal. It helps you:

  • Understand unfamiliar codebases
  • Fix bugs faster
  • Write clean, readable functions
  • Refactor safely
  • Handle Git operations conversationally

It fits naturally into existing workflows without forcing an IDE change.

If you want AI-assisted coding directly in your terminal, Claude Code is one of the cleanest and most developer-friendly tools available today. The native installer makes setup quick, updates stay automatic, and daily usage feels lightweight and natural.

Leave a Comment

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply