Menu
User

DropVPS Team

Writer: John hens

How to Install Claude Code on Ubuntu 25.04

How to Install Claude Code on Ubuntu 25.04

Publication Date

02/25/2026

Category

Articles

Reading Time

2 Min

Table of Contents

Installing Claude Code on Ubuntu 25.04 allows developers to integrate powerful AI coding assistance directly into their workflow, improving productivity, debugging speed, and overall code quality.

STEP 1: Update Your System

Before installing any new software, it is essential to update your package list and system libraries to avoid compatibility issues and ensure smooth installation.

sudo apt update
sudo apt upgrade -y

STEP 2: Install Node.js and npm

Claude Code requires Node.js and npm to run properly, so you must install them first

sudo apt install nodejs npm -y

Verify installation:

node -v && npm -v

STEP 3: Install Claude Code Using npm

This step downloads and installs Claude Code globally on your Ubuntu system, making it accessible from anywhere in the terminal.

sudo npm install -g @anthropic-ai/claude-code

Verify installation:

claude --version

STEP 4: Configure Environment Path 

If the claude command is not recognized, you may need to manually add npm global binaries to your system PATH.

export PATH="$HOME/.npm-global/bin:$PATH"

Make it permanent:

echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc

STEP 5: Authenticate Claude Code

To use Claude Code, you must log in with your API credentials to enable full AI-powered features.Follow the on-screen instructions to authenticate securely

claude login

STEP 6: Test Claude Code Installation

Testing ensures that Claude Code is working correctly and ready for real development use.

claude help

Example test command:

claude "Explain how a Linux process works"

STEP 7: Fix Common Installation Issues

If you encounter permission errors or missing dependencies, these commands usually resolve them quickly.

sudo npm cache clean -f

Reinstall if needed:

sudo npm install -g @anthropic-ai/claude-code --force
Linux VPS
U
Loading...

Related Posts