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 October 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.
Three features that macOS and Windows have are missing or limited in the Linux desktop beta: Computer Use, where Claude controls apps on your screen, voice dictation, and the Quick Entry global hotkey. Anthropic documents Computer Use and dictation as not available on Linux. The Quick Entry hotkey works on an X11 session, but on a native Wayland session it needs your desktop environment's GlobalShortcuts portal, so without that portal the hotkey is not available. echo $XDG_SESSION_TYPE prints x11 or wayland and tells you which case you are in. The CLI has its own voice dictation, so the dictation 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. Those are the two sign-ins Anthropic's Linux install page lists, and it sends API key users to the CLI. Anthropic documents a second deployment mode of the same app separately: configured with an inference provider (Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, an LLM gateway, or the Anthropic API directly), the sign-in screen offers to skip Anthropic authentication, and the provider handles inference and billing for Chat, Cowork and Code. Those docs name a Linux location for the managed configuration, /etc/claude-desktop/managed-settings.json, and the Linux install page now links to the third-party deployment docs. On devices with no Claude Desktop configuration, Claude Desktop 3.1623.1 or later also offers Use your Claude API account on the standard sign-in screen, where you can sign in with Claude Console or enter an API key without advance configuration. In Claude Desktop 4.23118.0 or later, that link is hidden at a computer login where an organisation blocks other accounts, even without device management.
Cowork tasks that run on your own machine use a virtual machine, so they need hardware virtualization turned on and your user in the kvm group (sudo usermod -aG kvm $USER, then log out and back in). Not every Cowork task runs locally. Since October 6, 2026, new Cowork tasks on Pro, Max and Ultra plans run in Anthropic's cloud, with no setting to keep them on your computer, and Team and Enterprise organisations that have the unified Chat and Cowork experience turned on also run tasks in the cloud. On those plans the virtual machine matters only for tasks already started on your computer, and Anthropic points new work that has to stay local to Claude Code in the desktop app.
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 on cloud infrastructure instead of on your machine: Anthropic's by default, or your organisation's own self-hosted environment if it routes sessions there. It always uses your subscription credentials.
The limit of the browser is the useful thing to understand. A browser on its own 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, the desktop app or a configured self-hosted runner. Cowork cloud sessions can reach connected local folders through the desktop app while it is open.
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 asks before applying edits in Manual mode. Auto mode applies edits with background safety checks and is the built-in default for current interactive sessions unless settings or policy change it. Start with
claude --permission-mode defaultto review actions yourself. - It runs shell commands under the session's permission mode, 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. In Claude Code 2.1.302 or later, these runs start in Manual mode when no permission mode is set, and actions needing approval are denied unless you supply an approval mechanism; pass--permission-mode autoto have the classifier review them. What that answer reads like is yours to set, because an output style edits the system prompt behind every reply and can keep a scripted run terse while an interactive session explains itself. - 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 October 2026 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-codeOn npm 12, the postinstall step is skipped by default, leaving claude unable to run. If npm --version starts with 12, use the native installer above or add Claude Code to allow-scripts in your user npm configuration before reinstalling.
Do 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 copy the separate authorisation URL shown above the terminal's paste prompt. Open that URL in the browser on your own computer. After you sign in through that URL, the browser shows a login code instead of returning to localhost. 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 with little memory free the kernel out-of-memory killer can end the install, and the installer then reports:
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 normally puts the same credential in the encrypted Keychain, but falls back to the same plain file when the Keychain rejects the write. 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, if the login cannot be refreshed, every model 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, with exceptions on some Enterprise plans. A Pro, Max, Ultra or Team 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. So does an Enterprise account on a new or self-serve plan outside HIPAA-ready organisations, whose single Enterprise seat includes Claude Code. Older Enterprise plans keep separate seat types instead: there the Claude Code surfaces need a Chat + Claude Code seat, or a Premium seat on an older seat-based plan, and a Chat-only or Standard seat does not include them. HIPAA-ready Enterprise organisations also use separate Chat and Chat + Claude Code seat types. On a HIPAA-ready Enterprise plan, Claude Code requires a Chat + Claude Code seat, and BAA coverage for the terminal and the Code tab of Claude Desktop requires the HIPAA configuration or applicable zero data retention coverage. The VS Code and JetBrains extensions and cloud sessions are not covered by the HIPAA configuration. On Pro, Max, Ultra, Team and seat-based Enterprise plans it is also one usage allowance across all of them, so a long CLI run on your server eats into what the desktop app has left, and which limit window you have hit and what to do about it is the thing to work out when any of the surfaces starts refusing work. A usage-based Enterprise plan has no included allowance to run out of: every surface bills at API rates from the first token. The free claude.ai plan does not include Claude Code access. Without a paid plan, the CLI can sign in with a Claude Console account, or, if your organisation uses Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry, authenticate through that provider with no browser login. With a claude.ai subscription or SSO sign-in, the desktop app's Claude Code parts need a paid plan. The separately configured third-party mode described above and, where offered, the Claude API account option on unmanaged devices let the desktop app use Console or provider billing instead.
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. In its standard mode, the desktop app signs in with OAuth, and in third-party mode it uses the credential in its own configuration.
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. Either the installer downloaded the wrong binary variant, usually the musl build on a glibc system, or you are on a musl system that lacks the runtime libraries. The wrong variant 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
The Claude API account sign-in policy, unattended permission defaults, SSH login flow and credential storage were checked on November 7, 2026; other version numbers and dates in this guide remain snapshots of October 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 October 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 the Quick Entry global hotkey works on X11 but needs your desktop environment's GlobalShortcuts portal on a native Wayland session. 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 October 2026. 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 copy the separate authorisation URL shown above the terminal's paste prompt. Open that URL in the browser on your own computer, not on the server. After you sign in through that URL, the browser shows a login code instead of returning to localhost. 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; macOS normally uses the encrypted Keychain but falls back to the same plain file when the Keychain rejects a write. Any process running as your user can read the Linux credential 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, Ultra or Team plan signs you in to claude.ai, the desktop app, the CLI and the VS Code extension with one account, and so does Enterprise, except that older and HIPAA-ready Enterprise plans include Claude Code only on seats that carry it, such as Chat + Claude Code seats. HIPAA-ready organisations use separate Chat and Chat + Claude Code seat types, and only Chat + Claude Code seats include Claude Code. The free claude.ai plan does not include Claude Code, so the terminal CLI needs a paid plan, a Claude Console account, or a cloud provider your organisation uses, such as Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry. The desktop app supports subscription or SSO sign-in and configured third-party inference; on devices with no Claude Desktop configuration, version 3.1623.1 or later also offers a Claude API account option that accepts Console sign-in or an API key without advance configuration. In version 4.23118.0 or later, that link is hidden at a computer login where an organisation blocks other accounts, even without device management. The API is billed separately per token from a Console account, which is a different product from a subscription.