Omniscio

OmniscioGuidesInstall Claude Code on Linux

Install Claude Code on Linux

Claude Code installs on Linux with one line in a terminal, or from Anthropic's signed apt, dnf and apk repositories if you would rather your package manager kept it current. Both routes install the same program.

Each route below installs the same program, and every command is Anthropic's own. Choose the one that matches how you like to install software.

Last checked against Anthropic's setup documentation on November 16, 2026. By the Omniscio team. Updated .

What you need first

Anthropic lists the supported distributions by name: Ubuntu 20.04 or later, Debian 10 or later, and Alpine Linux 3.19 or later. Its dnf repository covers Fedora and RHEL.

Check your release before you start. Anthropic's list is a minimum, and an older release is outside what it supports.

The hardware is the same everywhere. A 64-bit x64 or ARM64 processor, at least 4 GB of RAM, and an internet connection that can reach claude.ai and downloads.claude.ai.

You also need a Claude account that includes Claude Code: Pro, Max, Ultra, Team, Enterprise, or a Console account billed for API use. Anthropic states that the free claude.ai plan does not include Claude Code access.

Source: the system-requirements and authenticate sections of Anthropic's advanced setup page, read November 16, 2026.

Install with the native installer

Open a terminal — on most distributions Ctrl, Alt and T does it, or open Terminal from your applications menu — and run the line Anthropic publishes for macOS, Linux and WSL:

curl -fsSL https://claude.ai/install.sh | bash

Paste with Ctrl, Shift and V. The command shows no progress while Claude Code downloads, which Anthropic warns about, so leave the window open. When it finishes, Anthropic's terminal guide says you see Claude Code successfully installed!

When it finishes, open a new terminal and confirm the version:

$ claude --version
2.1.325 (Claude Code)

Anthropic calls this the recommended route. It installs the newest release by default, and it updates itself in the background, as an npm install does. The update guide covers both in full.

Pick one route and stay on it. Two installs on one machine can cause version mismatches, and the uninstall guide shows how to find and remove the extra one.

Sources: the native-install tab of Anthropic's setup page and the macOS-and-Linux steps of the terminal guide, read November 16, 2026.

Install with apt on Debian or Ubuntu

Anthropic publishes a signed apt repository with two channels. The commands below configure stable, which Anthropic says fits most users and is typically about a week behind.

Fresh Debian and Ubuntu installs may not have the two tools these steps use, so install them first if either command is missing:

sudo apt install curl gnupg

Download Anthropic's signing key into apt's keyring folder:

sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSL https://downloads.claude.ai/keys/claude-code.asc \
  -o /etc/apt/keyrings/claude-code.asc

Check the key before you trust it. Anthropic says the only fingerprint gpg --show-keys /etc/apt/keyrings/claude-code.asc should print is 31DDDE24DDFAB679F42D7BD2BAA929FF1A7ECACE, and a different one means the download returned something else, so do not continue. The dnf section below prints the same key with spaces in it.

Then register the repository and install. The signed-by path in the line is what tells apt to trust only packages signed with that key:

echo "deb [signed-by=/etc/apt/keyrings/claude-code.asc] https://downloads.claude.ai/claude-code/apt/stable stable main" \
  | sudo tee /etc/apt/sources.list.d/claude-code.list
sudo apt update
sudo apt install claude-code

To follow every release instead of the stable channel, use /apt/latest and the suite name latest in the same line. To update later: sudo apt update && sudo apt upgrade claude-code.

Source: the apt tab of the Linux-package-managers section on Anthropic's setup page, read November 16, 2026.

Install with dnf on Fedora or RHEL

Anthropic publishes the dnf repository as a file you write once. This one configures the stable channel and checks signatures against Anthropic's key:

sudo tee /etc/yum.repos.d/claude-code.repo <<'EOF'
[claude-code]
name=Claude Code
baseurl=https://downloads.claude.ai/claude-code/rpm/stable
enabled=1
gpgcheck=1
gpgkey=https://downloads.claude.ai/keys/claude-code.asc
EOF
sudo dnf install claude-code

Then check the key. dnf downloads it on first install and asks you to confirm the fingerprint, which should read 31DD DE24 DDFA B679 F42D 7BD2 BAA9 29FF 1A7E CACE.

For every release rather than the stable channel, change baseurl to https://downloads.claude.ai/claude-code/rpm/latest. To update later, run sudo dnf upgrade claude-code.

Source: the dnf tab of the Linux-package-managers section on Anthropic's setup page, read November 16, 2026.

Install with apk on Alpine

Alpine is the distribution that needs an extra step first. It ships neither bash nor curl, and Anthropic says the documented install line fails with a not found error until both are there.

apk add bash curl

Then add Anthropic's repository. The key goes in Alpine's key folder, and the repository line appends to the list apk reads:

wget -O /etc/apk/keys/claude-code.rsa.pub \
  https://downloads.claude.ai/keys/claude-code.rsa.pub
echo "https://downloads.claude.ai/claude-code/apk/stable" >> /etc/apk/repositories
apk add bash claude-code

sha256sum /etc/apk/keys/claude-code.rsa.pub should print 395759c1f7449ef4cdef305a42e820f3c766d6090d142634ebdb049f113168b6. To update later, run apk update && apk upgrade claude-code.

Claude Code itself needs bash or zsh on Alpine as well, and Anthropic's apk command installs bash beside the package.

Sources: the apk tab of the Linux-package-managers section and the Alpine-and-musl section on Anthropic's setup page, read November 16, 2026.

Install with npm

The npm package installs the same native binary the installer fetches, so claude does not run on your Node at runtime. The install itself asks for Node.js 22 or later.

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

Do not run it with sudo. Anthropic explains that Claude Code upgrades itself without sudo, so an install that needed it cannot update automatically later.

The Linux packages are linux-x64, linux-arm64, linux-x64-musl and linux-arm64-musl, chosen for your processor and libc. To update an npm install, rerun the same command rather than npm update -g, which respects the old version range.

Source: the npm section of Anthropic's setup page, read November 16, 2026.

If the shell says command not found

The native installer puts the launcher at ~/.local/bin/claude and does not edit your shell configuration. On Bash, Anthropic's fix is one line and a reload:

echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

If it still says command not found after that, run ls -la ~/.local/bin/claude. A listing means the program is there, and the usual remaining cause is a terminal opened before the change; no listing means the install did not finish. The command not found guide covers both.

The PATH fix is for the native installer. A reader who used apt, dnf or apk will not need it.

Sources: the Verify your PATH section of Anthropic's install troubleshooting page and the macOS-and-Linux troubleshooting section of the terminal guide, read November 16, 2026.

Updating, removing, and running several sessions

Native and npm installs update themselves. Anthropic states that apt, dnf and apk installs do not: package manager installations do not auto-update through Claude Code, and those commands need elevated privileges.

One caveat matters on servers. Anthropic warns that an in-place upgrade can remove the binary a session on another machine is still running, and suggests DISABLE_UPDATES plus your own deployment tooling when a home directory lives on network storage.

The update guide covers the commands for every route, the release channels, and how to pin a version. The uninstall guide has the removal commands for each one.

To run several sessions at once, each one is its own terminal. Omniscio, the desktop app we make for running many Claude Code sessions at once, puts them in one window on Linux, macOS and Windows. It is free to use with up to 8 projects, and Pro is $20/month or $192/year; neither plan includes an AI allowance.

The toolchain update page explains how it updates Claude Code for you, and the multi-session guide compares the manual routes.

Where these answers come from

The release checked here was 2.1.325, the version npm served and claude --version printed on November 16, 2026. Distribution support changes more slowly than the install commands, but both are worth re-reading before trusting an old copy of this page.

Common questions

How do I install Claude Code on Linux?

Run the native installer in a terminal: curl -fsSL https://claude.ai/install.sh | bash. It downloads a binary built for your processor and shows no progress while it does. Open a new terminal and run claude --version to confirm it worked. Debian, Ubuntu, Fedora, RHEL and Alpine can install from Anthropic's own signed repositories instead.

Which Linux distributions does Claude Code support?

Anthropic lists Ubuntu 20.04 or later, Debian 10 or later and Alpine Linux 3.19 or later, on a 64-bit x64 or ARM64 processor with at least 4 GB of RAM. Fedora and RHEL are the two distributions its dnf repository covers. A release older than those is outside what Anthropic supports.

What does the apt repository add to my system?

It adds Anthropic's signing key at /etc/apt/keyrings/claude-code.asc and one line in /etc/apt/sources.list.d/claude-code.list pointing apt at the stable repository. The package itself comes from that repository, and removing both files is part of Anthropic's uninstall steps.

Why does the install fail on Alpine with a not found error?

Alpine does not ship bash or curl, and Anthropic's install line needs both. Install them first with apk add bash curl. Claude Code itself also needs bash or zsh, and Anthropic's apk command installs bash beside the package.

Does a Linux package manager install update itself?

No. Anthropic states that Claude Code's own auto-update does not manage apt, dnf or apk installs, so updates arrive through your normal system upgrade workflow. Each repository offers a stable channel about a week behind and a latest channel that carries every release.

Why is claude not found after installing on Linux?

The native installer puts the launcher at ~/.local/bin/claude and does not add that folder to PATH itself. Anthropic's fix for Bash is one line in ~/.bashrc and a reload. That fix is written for the native installer's folder.

Installed on Linux. Now run several sessions at once

Omniscio runs many Claude Code sessions side by side in one window, on the Claude Code you just installed. The features page lists what it does today.