How to Install Claude Code on macOS, Windows, and Linux

Danny · July 29, 2026 · 3 min read · Updated August 13, 2026

This guide covers Claude Code prerequisites, macOS, Windows, Linux, and WSL installation options, plus how to verify the setup with claude --version and claude doctor.

Before you install

Claude Code is not difficult to install. Most installation problems come from an unprepared local environment. Before running any command, check these basics:

  • Use a supported operating system: macOS, Linux, Windows, or WSL.
  • Have a working terminal ready: Terminal on macOS, PowerShell/CMD/Git Bash/WSL on Windows.
  • Make sure your Claude account can log in normally and that your region and subscription support the features you want to use.
  • If you plan to install through npm, make sure Node.js 18+ is installed first.
  • Keep the network stable during installation instead of switching networks repeatedly.

For a first-time setup, start with the current official installer. Avoid copying old commands from outdated tutorials without checking them, because Claude Code installation methods and desktop-app support can change over time.

macOS / Linux / WSL

macOS, Linux, and WSL can usually use the same installer flow. Open your terminal and run:

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

After installation, close the current terminal window and open a new one. This avoids a common issue where PATH has not refreshed yet and the system cannot find the claude command.

Windows

On Windows, you have three common choices: PowerShell, WinGet, or WSL. If you already use Linux-style tooling for web, Python, or Node projects, WSL 2 is often the cleanest option. If you prefer native Windows, try PowerShell or WinGet first.

PowerShell

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

WinGet

winget install Anthropic.ClaudeCode

WSL

Inside WSL, use the same command as Linux:

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

Verify the installation

Do not assume Claude Code is ready just because the installer finished. Run at least two checks.

First, confirm that the command is available:

claude --version

If it returns a version number, your system can find the claude command. Next, check the local environment:

claude doctor

claude doctor is useful because it checks common issues around authentication, environment variables, and terminal setup. If it reports a problem, follow that output first instead of repeatedly uninstalling and reinstalling.

Finally, start Claude Code itself:

claude

If the interactive interface opens, the basic installation and login flow are working.

Desktop app

If you prefer a graphical interface, download the Claude desktop app from Claude.com. Availability and features depend on your platform and subscription plan. I treat the desktop app as optional. For command-line use, the real checks are still claude --version, claude doctor, and claude.

Account and environment stability

Installing Claude Code is only the first step. For long-term use, keep your account, device, network, and payment setup stable. Read next: How to Reduce Claude Code Account Risk.

References

More guides like this,
every Thursday.

Hosting reviews, builder comparisons, performance tips, and plugin picks — curated weekly for WordPress site owners and builders.