Skip to content
XXD VPS Guide
中文
  1. How-to
  2. AI tools
  3. Install Claude Code

Install Claude Code

About 5 minutesFor: People with a paid Claude planMain guide step 2: Set up an AI assistant

What you need

  • A Claude Pro, Max, Team, Enterprise or Console account (the free plan doesn’t include Claude Code);
  • to be in a country or region Anthropic supports;
  • Mac: macOS 13 or later; Windows: WSL installed first.

1. Install

Open the terminal (Windows: Ubuntu in WSL), paste this command and press Enter:

Install Claude Code (Mac, Linux, WSL)
curl -fsSL https://claude.ai/install.sh | bash

It shows no progress while installing — wait for it to finish. Then close the terminal and open it again, and check:

Check the version
claude --version

A version number (such as 2.1.211 (Claude Code)) means it’s installed. Installed this way, Claude Code updates itself in the background.

2. Log in

Type claude in the terminal and press Enter. Log in to your Claude account in the browser as prompted, authorize, then return to the terminal.

You should see

The terminal shows the Claude Code chat interface, ready for a question.

Stuck?

claude: command not found?

Reopen the terminal after installing. Still failing? Run claude doctor (if it runs) or see the PATH section of the official setup guide.

The browser didn't open?

The terminal prints a login URL — open it in a browser.

Can I install it on Windows without WSL?

Claude Code itself supports native Windows, but this setup’s scripts need Linux tools, so the guide uses WSL throughout.

This setup is for you and your family only. Follow local laws and each site's and AI tool's terms of use. Open source (MIT) — code and feedback on GitHub.