Claude Code is a command-line interface that enables you to interact with Anthropic’s Claude model directly from your terminal. It’s a lightweight and efficient way to run prompts, manage conversations, and integrate Claude into your development workflow. This tutorial shows you how to install Claude Code on your VPS and provides basic usage examples.
Installation
To install Claude Code, log in to your VPS and run the following command:
curl -fsSL https://claude.ai/install.sh | bash
This script will download and install the latest version of the Claude CLI tool. After installation, the Claude command will be available globally from your shell.
You can verify installation with:
claude --version
If you have received a "Setup notes", you'll also need to add the Claude executable to your bash profile. This can be done by executing:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
Logging in
To use Claude Code, you need to authenticate your session. Run:
claude /login
This command will display a login URL that you will need to copy to your browser. Follow the instructions to connect your account.
Example commands
Once you’re logged in, here are some basic usage examples to get started.
Run a prompt interactively:
claude
You’ll be dropped into a REPL where you can type questions or instructions, and Claude will respond.
Send a one-off prompt from the command line:
claude "Summarize this week's project updates."
Create or continue a conversation:
claude /thread new "Let's brainstorm product ideas."
claude /thread list
claude /thread switch [THREAD_ID]
Check all available commands:
claude /help
With Claude Code installed on your VPS, you can access powerful AI tools directly from the terminal. Whether you’re drafting content, writing code, or querying structured data, Claude Code offers a fast and scriptable way to integrate AI into your daily workflows. For more advanced usage, visit the official documentation at https://docs.anthropic.com/en/docs/claude-code/overview.