Claude on Linux: Desktop App and CLI
What runs natively on Linux today: the beta desktop app from apt, the Claude Code CLI, editor plugins, and which paid plan covers each one.
Which parts of Claude run natively on Linux today
Claude on Linux runs on four separate surfaces, and as of August 2026 all four work on an ordinary Ubuntu or Debian machine. The desktop app installs from Anthropic's apt repository and is in beta. The Claude Code CLI (command line interface) is a compiled binary, and it runs on more distributions than the desktop app does. The web app at claude.ai needs only a browser, and the API is an HTTPS endpoint you call from your own code.
Two features that macOS and Windows have are missing from the Linux desktop beta: Computer Use, where Claude controls apps on your screen, and voice dictation. Anthropic documents both as not yet available on Linux. The CLI has its own voice dictation, so the gap is in the desktop app rather than in Claude itself.
Availability moves, so read this page as a description of the surfaces and check the current state before you plan around it. The last section lists the pages to check.
Install the Claude desktop app on Ubuntu or Debian
The documented requirements are Ubuntu 22.04 or later, or Debian 12 or later, on x86_64 (which dpkg calls amd64) or arm64. Other Debian-based distributions may work but are not tested. Fedora and RHEL have no package yet, so on those you use the CLI or the browser.
Install from the apt repository rather than from a downloaded .deb file. The Linux app has no updater of its own, so new versions reach you only through your package manager, and registering the repository is what lets apt upgrade see them.
sudo apt install curl gnupg
sudo curl -fsSLo /usr/share/keyrings/claude-desktop-archive-keyring.asc \
https://downloads.claude.ai/claude-desktop/key.asc
gpg --show-keys /usr/share/keyrings/claude-desktop-archive-keyring.ascgpg --show-keys should print the fingerprint 31DDDE24DDFAB679F42D7BD2BAA929FF1A7ECACE. Compare it before you register the repository, because a signing key you did not check is a key you are trusting blind. If gpg reports that the file holds no valid OpenPGP data, the download failed, and apt update then fails later with NO_PUBKEY BAA929FF1A7ECACE.
Registering the repository is one deb line written to /etc/apt/sources.list.d/claude-desktop.list. Copy that line from Anthropic's Linux install page, code.claude.com/docs/en/desktop-linux, exactly as printed there. The repository address is the part of this procedure most likely to move, and a line typed from memory is what leaves you staring at E: Unable to locate package claude-desktop afterwards. Read the line before you paste it: arch=amd64,arm64 is why apt on any other architecture finds nothing, and signed-by= points at the keyring file you just checked, which confines that key to this one repository instead of trusting it for everything else apt reads.
sudo apt update && sudo apt install claude-desktopStart it from your application launcher, or run claude-desktop in a terminal. Sign in with your claude.ai account, or through your organisation's SSO (single sign-on) if your company set that up. The desktop app does not accept a Claude Console API key: key based authentication is a CLI feature.
E: Unable to locate package claude-desktop means apt never read the repository. cat /etc/apt/sources.list.d/claude-desktop.list should show the deb line you wrote, and dpkg --print-architecture should print amd64 or arm64, because no packages are published for other architectures. Updates then arrive with the rest of your system, from sudo apt update && sudo apt upgrade.
What only exists in a browser
claude.ai works in any current browser on any distribution, which makes it the answer on Fedora, RHEL, Arch, openSUSE and anything else with no package. The browser also gets Claude Code on the web, where the session runs in Anthropic's cloud instead of on your machine, and it always uses your subscription credentials.
The limit of the browser is the useful thing to understand. A cloud session cannot read the files on your own server or run a command on it. Anything that touches your machine needs software on that machine, which means the CLI or the desktop app.
What the CLI gives you that the web app does not
Start claude in a directory and it works on that directory. That is the difference, and the rest follows from it.
- It reads and edits the files in your working directory, and shows you each edit before it applies it.
- It runs shell commands you approve, so it can build a project, run a test suite, read a log, or inspect a service on the box itself.
- It runs without an interactive session:
claude -p "read the nginx error log and summarise it"prints one answer and exits, which is what you use from a cron job or a pipeline. - It connects MCP (model context protocol) servers with
claude mcp add, which gives the model tools beyond the filesystem. - It runs where there is no graphical desktop at all, which is every VPS (virtual private server) you will ever rent.
That last point is why a server guide cares about the CLI. A rented server has SSH (secure shell) and nothing else, so the terminal is the only surface that can be there with you. Running it that way has its own rules, which running Claude Code on a VPS inside tmux covers in full, and using Claude for everyday sysadmin work covers the jobs worth handing to it.
Editor integrations sit between the two. The VS Code extension needs VS Code 1.94.0 or later and gives you a graphical panel inside the editor, with diffs and plan review. It bundles a private copy of the CLI for that panel and does not put claude on your PATH, so typing claude in the integrated terminal still needs the standalone install. Editors built on VS Code install the same extension from the Open VSX registry, and there is a JetBrains plugin as well.
Do you need Node.js to run Claude Code on Linux?
Not with the recommended install. The native installer downloads a compiled binary, and that binary does not run on Node.js.
curl -fsSL https://claude.ai/install.sh | bash
claude --versionclaude --version should print a version number such as 2.1.211 (Claude Code). If something looks wrong, run claude doctor, which prints read-only diagnostics about the install and your settings files without starting a session.
Node.js matters only on the npm route. As of package version 2.1.198 the npm package asks for Node.js 22 or later, and on an older Node.js npm prints an EBADENGINE warning instead of failing, because the package pulls in the same native binary as a per-platform dependency and links it into place.
npm install -g @anthropic-ai/claude-codeDo not run that with sudo. The documentation warns against sudo npm install -g because it leaves root-owned files in your global npm prefix, so the next unprivileged install or update fails on permissions. When the npm global directory is not writable, background auto-update stops working and claude doctor lists the fixes.
Anthropic also publishes signed package repositories for Debian, Fedora, RHEL and Alpine, so sudo apt install claude-code works much like the desktop package does, with its own signing key at https://downloads.claude.ai/keys/claude-code.asc.
Should you install per user or system wide?
The native installer is a per-user install. It puts a launcher at ~/.local/bin/claude as a symlink into ~/.local/share/claude/versions/, needs no root, and updates itself in the background. Each user on the machine gets a separate copy at a separate version.
A package manager install is system wide. One binary serves every user, it needs root, and it does not auto-update through Claude Code. You upgrade it with sudo apt update && sudo apt upgrade claude-code, the same command you already run for everything else on the box.
Pick the per-user install on a machine you log into as yourself, which covers most VPS work. Pick the package install on a shared server or on a machine image, where you want one version for everyone and you want it to move on your schedule. On a native install, two settings in ~/.claude/settings.json decide how updates behave:
{
"autoUpdatesChannel": "stable",
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}The stable channel follows a release that is roughly a week old and skips releases with major regressions. DISABLE_AUTOUPDATER stops the background check only, so claude update still works and you keep control of when a new version lands. That matters on a server where a long job runs unattended and you would rather the binary did not change underneath it.
Log in over SSH, and keep the session alive
Two Linux-specific problems show up the first time you run the CLI on a rented server. The login flow wants a browser and the server has none. An SSH connection that drops takes your running work with it.
tmux solves the second one. A tmux session belongs to the tmux server on the remote machine, not to your connection, so a dropped link leaves the process running.
tmux new -s claude
claudeDetach with Ctrl-b then d, and come back later with tmux attach -t claude.
The login is the first problem. Run claude and it prints an authorisation URL. Open that URL in the browser on your own computer. After you sign in, the browser shows a login code instead of redirecting back, because the browser on your laptop cannot reach the callback server that Claude Code started on the remote machine's loopback address. Paste that code into the terminal at the Paste code here if prompted prompt, and the terminal reports Login successful.
For a session that has to start with nobody watching, claude setup-token opens the same browser authorisation and prints a one year OAuth token to the terminal. It saves the token nowhere, so copy it and set it where you need it.
export CLAUDE_CODE_OAUTH_TOKEN=your-tokenThat token needs a paid plan and can only make model requests. Treat it as a password with a one year life. Where to keep it, and how to stop an agent reading it back out, is the subject of keeping secrets out of reach of AI agents.
Small servers hit one more wall. Installing needs roughly 512 MB of free memory, and the documented hardware requirement for running it is 4 GB of RAM or more, so on a 1 GB instance the kernel out-of-memory killer ends the install:
Setting up Claude Code...
Installation was killed before it could finish (exit code 137). This usually means the system ran out of memory.Add swap, then run the installer again. Swap is disk space the kernel uses as overflow memory. It is much slower than RAM, and it is enough to finish an install.
sudo fallocate -l 2G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfileswapon enables the file for this boot only. Add a line for /swapfile to /etc/fstab if you want it back after a reboot. What else to lock down before you let an agent run commands on a live server is the subject of running Claude Code safely on a VPS.
Where your Claude credentials live on Linux
On Linux, /login writes the credential to ~/.claude/.credentials.json with file mode 0600. macOS puts the same credential in the encrypted Keychain, so a habit you formed on a Mac does not carry over: on Linux the token is a plain file in your home directory, and every process running as your user can read it. Setting CLAUDE_CONFIG_DIR moves the file under that directory instead.
Two things follow from that. A backup of /home contains a live login, so copying that backup to a shared machine hands your account to whoever else can read it. And a machine image built from a box where you logged in ships that login to every instance cloned from it. Run /logout before you snapshot anything.
Credential precedence catches people who hold a subscription and an API key at the same time. When ANTHROPIC_API_KEY is set in your shell, Claude Code uses it once you approve it, so your subscription sits unused while the key bills per token. /status shows which credential is active, and unset ANTHROPIC_API_KEY returns you to the subscription login.
Logins expire. Within three days of expiry the startup line reads Your login expires in 3 days, and that warning never blocks a request. After expiry every request fails with Login expired · Please run /login. Know this before you leave an unattended session running over a weekend, because such a session stops making progress and cannot recover on its own.
Does one Claude subscription cover all of it?
One paid plan covers every surface with the same login. A Pro, Max, Team or Enterprise account signs you in to claude.ai in a browser, to the desktop app, to the CLI and to the VS Code extension, and it is the same subscription each time. The free claude.ai plan does not include Claude Code access, so the CLI and the Claude Code parts of the desktop app need a paid plan or a Claude Console account.
The API is a different product with different billing. A Console account bills per token on what you actually send, which suits a service you are building rather than you typing at a terminal. Setting ANTHROPIC_API_KEY moves the CLI onto that billing path, and that is a choice you make, not a fallback.
Prices and plan limits change too often to restate here. Two pages track the current numbers: what Claude Code actually costs and which Claude plan you need. If you are weighing per-token billing against a monthly plan, the API measured against a subscription works through where the break-even sits.
The install errors you will actually see
bash: claude: command not found right after a successful install. The binary is at ~/.local/bin/claude and that directory is not in your shell's search path. Confirm it with echo $PATH | tr ':' '\n' | grep -Fx "$HOME/.local/bin", which prints nothing when the entry is missing. Fix it for bash with echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc, then run source ~/.bashrc. Installing the VS Code extension on its own never creates that file, because the extension keeps its CLI copy inside the extension directory.
Error loading shared library libstdc++.so.6. The installer picked the musl build for a glibc system. This happens when musl cross-compilation packages are present and the detection misreads them. Run ldd --version 2>&1 | head -1: output naming GNU libc or GLIBC means you are on glibc and received the wrong binary, so remove the install and run the installer again. On Alpine and other musl systems the fix is the opposite, apk add libgcc libstdc++ ripgrep.
Two copies of claude on one box. which -a claude lists every match in your PATH. A native install is a symlink from ~/.local/bin/claude into ~/.local/share/claude/versions/, a legacy local npm install lives under ~/.claude/local/, and npm -g ls @anthropic-ai/claude-code reveals a global npm install. Remove the ones you do not want, because a stale copy earlier in your PATH is what makes a fixed bug look unfixed.
Where to check the current state
- Linux desktop status, requirements and install commands: code.claude.com/docs/en/desktop-linux
- Supported distributions and every install method for the CLI: code.claude.com/docs/en/setup
- Which platforms have an app to download at all: claude.com/download
- Which plan includes what, and what it costs: claude.com/pricing
Every version number and date in this guide is a snapshot of August 2026. The shape is what stays true: four surfaces, one login across the paid ones, and one decision about whether the CLI belongs to your user or to the whole machine.
FAQ
Is there a Claude desktop app for Linux?
Yes. As of August 2026 it is in beta, and it supports Ubuntu 22.04 or later and Debian 12 or later on amd64 or arm64. Install it with sudo apt install claude-desktop after adding Anthropic's apt repository and its signing key, so that new versions arrive with your normal system upgrades. The Linux build has the same tabs as the macOS app, including the Claude Code tab. Computer Use and voice dictation are not in the Linux build yet, and Fedora and RHEL have no package, so on those distributions use the CLI or claude.ai in a browser.
Do I need Node.js to run Claude Code on Linux?
Not for the recommended install. curl -fsSL https://claude.ai/install.sh | bash downloads a compiled binary that does not use Node.js at runtime. Node.js matters only if you install the npm package, which asks for Node.js 22 or later as of version 2.1.198. On an older Node.js, npm prints an EBADENGINE warning and the install still finishes, because the same native binary is pulled in as a per-platform dependency. Never install it with sudo npm install -g, which leaves root-owned files in your npm prefix and breaks later updates.
How do I log in to Claude Code over SSH?
Run claude and it prints an authorisation URL. Open that URL in the browser on your own computer, not on the server. After you sign in, the browser shows a login code rather than redirecting, because it cannot reach the callback listener that Claude Code started on the remote machine's loopback address. Paste that code at the Paste code here if prompted prompt. For sessions that start with nobody present, run claude setup-token and set the printed token as CLAUDE_CODE_OAUTH_TOKEN wherever it is needed.
Where does Claude Code store my login on Linux?
In ~/.claude/.credentials.json with file mode 0600, or under CLAUDE_CONFIG_DIR when you set that variable. No keychain is involved on Linux, unlike macOS, so any process running as your user can read the file. A /home backup or a machine image therefore carries a working login: run /logout before you snapshot or copy a system. If ANTHROPIC_API_KEY is also set in your environment, it takes precedence over the stored subscription login once you approve it, and /status shows which one is active.
Does my Claude Pro subscription cover the CLI as well as the web app?
Yes. A Pro, Max, Team or Enterprise plan signs you in to claude.ai, the desktop app, the CLI and the VS Code extension with one account. The free claude.ai plan does not include Claude Code, so the terminal CLI needs a paid plan or a Claude Console account. The API is billed separately per token from a Console account, which is a different product from a subscription.