How to Install Claude Code on Ubuntu 26.04 LTS (Resolute Raccoon)
Ever found yourself staring at a terminal, wondering how an AI agent could just live in your project directory—reading your code, running your tests, pushing commits? That’s Claude Code, Anthropic’s official CLI tool that brings Claude directly into your terminal. It’s not a web chat bolted onto a command line. It has full repository awareness, understands your git history, runs shell commands, edits files, and even spins up sub-agents for complex tasks.
As of mid-2026, Claude Code has matured significantly. It now supports MCP servers, hooks, sub-agent orchestration, and works with the latest Claude models including Opus 4.8 and Fable 5. And the good news? Installing it on Ubuntu 26.04 LTS is surprisingly painless.
This guide covers three installation methods, authentication, and a quick sanity check so you can go from zero to claude in under five minutes.
Before You Start
Ubuntu 26.04 LTS (Resolute Raccoon) was released on April 23, 2026. It ships with GNOME 50 (Wayland-only), systemd 259, and Node.js in its default repos. Claude Code needs:
- 4 GB RAM minimum (8 GB recommended for larger codebases)
- Internet access to
api.anthropic.comandclaude.ai - A Claude subscription—Pro ($20/mo), Max ($100-200/mo), Teams, or Enterprise. The free Claude.ai plan does NOT include Claude Code access.
- An API key from console.anthropic.com (optional, for API-based auth)
Method 1: Native Installer (Recommended)
Anthropic now publishes a native Linux installer that requires zero dependencies. It’s the cleanest path and auto-updates in the background.
curl -fsSL https://claude.ai/install.sh | bashThat’s it. The script places the claude binary at ~/.local/bin/claude and stores versioned binaries at ~/.local/share/claude/versions/ for rollback support.
If claude is not found after install, your PATH may not include ~/.local/bin. Fix it:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcVerify the installation:
claude --versionExpected output: 2.x.xxx (Claude Code).
Method 2: Official APT Repository
Anthropic also publishes a signed APT repository for users who want updates through the normal apt upgrade workflow. This is a great option if you manage packages centrally.
# Add the repository and signing key
sudo tee /etc/apt/sources.list.d/claude-code.sources >/dev/null <<EOF
Types: deb
URIs: https://downloads.claude.ai/claude-code/apt/latest
Suites: latest
Components: main
Signed-By:
$(curl -sS https://downloads.claude.ai/keys/claude-code.asc | sed "s/^/ /")
EOF
# Refresh and install
sudo apt update
sudo apt install -y claude-codeCheck the version:
claude --versionMethod 3: npm Global Install (Legacy)
If you prefer npm or already have Node.js 18+ set up, you can install via npm. Claude Code is published as @anthropic-ai/claude-code.
Ubuntu 26.04’s default Node.js works, but for the latest LTS line (Node.js 24), use NodeSource:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo bash -
sudo apt install -y nodejsThen install globally:
sudo npm install -g @anthropic-ai/claude-code
which claude
claude --versionThis puts claude on your PATH immediately.
Authentication
The first time you run claude, it opens a browser window for OAuth authentication. On a headless server, use:
claude loginThis prints a URL. Open it in any browser, log in to your Anthropic account, and authorize the CLI.
Alternatively, set an API key directly:
export ANTHROPIC_API_KEY="sk-ant-..."
claudeFirst Run
Navigate to a project directory and start Claude Code:
cd ~/your-project
claudeOn first launch, Claude Code will:
- Ask you to trust the current directory (read-only vs. full access)
- Optionally let you pick a theme (light/dark)
- Prompt for directory-level permissions (can it read your files? run commands?)
Once configured, you’re in. Try something like:
What's the top-level structure of this project?Uninstalling
If you used the native installer, remove cached data:
rm -rf ~/.claude ~/.claude.json ~/.local/share/claudeIf you used the APT repository:
sudo apt purge --autoremove -y claude-code
sudo rm -rf /etc/apt/sources.list.d/claude-code.sources
rm -rf ~/.claude ~/.claude.jsonIf you used npm:
sudo npm uninstall -g @anthropic-ai/claude-codeFinal Thoughts
Claude Code has become an essential part of many developers’ workflows on Linux. The native installer is the fastest and most reliable path on Ubuntu 26.04 LTS—one curl command, and you’re set. The APT method is better if you want centralized package management across multiple machines.
Whichever path you choose, the result is the same: an AI coding agent that lives in your terminal, understands your project, and can actually do things instead of just suggesting them.
Give it a try. You might be surprised how quickly “let me just ask Claude” becomes part of your daily flow.
Comments