Install Claude Code on Ubuntu 26.04

Install Claude Code on Ubuntu 26.04

Claude Code is a command-line tool designed to bring AI-assisted development workflows directly into the terminal. It enables interaction with Claude models for coding tasks, automation, and local development assistance. This tutorial demonstrates how to install Claude Code on Ubuntu 26.04.

Install Claude Code

Begin by adding the official Claude Code APT 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/stable
Suites: stable
Components: main
Signed-By:
$(curl -sS https://downloads.claude.ai/keys/claude-code.asc | sed "s/^/ /")
EOF

After the repository is added, refresh the package index:

sudo apt update

Install the Claude Code package:

sudo apt install -y claude-code

Confirm the installation by checking the Claude Code version:

claude --version

Testing Claude Code

Launch the interactive Claude Code shell to verify that the tool is functioning correctly:

claude

After startup, follow the on-screen prompts to complete initial configuration. This may include selecting preferred theme, signing in with a Claude account, and trust the current directory. Once these steps are completed, the CLI environment becomes fully ready for development workflows and AI-assisted coding tasks.

Uninstall Claude Code

If decided to completely remove Claude Code from the system, purge the installed package:

sudo apt purge --autoremove -y claude-code

Remove the repository configuration file:

sudo rm -rf /etc/apt/sources.list.d/claude-code.sources

To remove Claude Code settings and cached data, run the following command:

rm -rf ~/.claude ~/.claude.json ~/.local/share/applications/claude-code-url-handler.desktop

Leave a Comment

Cancel reply

Your email address will not be published.