Skip to content

Set Up Anthropic Claude Code on Linux

Using Claude Code on Linux

Anthropic Claude Code is an AI-powered coding assistant that works directly inside your Linux terminal. Instead of switching between your browser and development environment, Claude can inspect your project, explain code, create files, modify existing code, run commands (with your permission), debug problems, and help automate development tasks.

Unlike the Claude web interface, Claude Code works directly inside your project folder, giving it awareness of your files and directory structure.

This makes it ideal for:

  • Software development
  • Server administration
  • DevOps automation
  • Writing documentation
  • Learning programming
  • Troubleshooting Linux systems
  • Reviewing code before deployment

Before you begin

Use this guide to set up Anthropic Claude Code on your VPS.

Claude Code allows you to securely use your existing Claude account without manually managing API keys.

This authentication method is ideal for users who already have one of the following:

  • Claude Pro
  • Claude Max
  • Claude Team
  • Claude Enterprise
  • Anthropic Console account

Host CPU Passthrough required

To use Claude Code on a Linux VPS, please contact our support team and request Host CPU Passthrough (AVX/AVX2 CPU instructions) to be enabled before continuing.

Setting up Claude Code

1

Install Claude Code

Install the latest Claude Code CLI:

npm install -g @anthropic-ai/claude-code@latest \
  --allow-scripts=@anthropic-ai/claude-code

Verify the installation:

claude --version

If a version number is displayed, Claude Code has been installed successfully.

2

Sign in to Claude

Run:

claude auth login

Claude Code will display an authentication URL.

  1. Copy the URL.
  2. Open it in your web browser.
  3. Sign in with your Claude account.
  4. Approve the authorization request.
  5. Return to your VPS terminal.
  6. Enter the authorization code if prompted.

Sensitive callback URL

Treat the callback URL as sensitive. It may contain temporary authorization details.

3

Verify authentication

Confirm that Claude Code has been authenticated successfully:

claude auth status --text

You can also perform a quick test:

claude -p "Reply with exactly: Claude CLI is working"

Expected output:

Claude CLI is working

Congratulations! Claude Code is now connected to your account and you can use it on your Linux VPS.

Coming from OpenClaw?

If you came from the OpenClaw setup, return to Set up OpenClaw on Linux.

What's next?

Continue to Getting started with Claude CLI for common tasks and tips.