Install Claude Code on Fedora Linux with dnf (zsh)

Published 18 July 2026

date
env
linux Fedora Workstation 41–44 (x86_64 or aarch64), zsh — Claude Code 2.1.205 macos N/A

Install Claude Code on Fedora from Anthropic’s signed dnf repository — the recommended method on Fedora/RHEL — configure it for zsh, and handle the two things that trip people up: migrating off a curl | bash native install, and the misleading “Update available!” banner. Verified 2026-07-18 on Fedora 44 with Claude Code 2.1.205.


1. Prerequisites

  • 4 GB+ RAM, x64 or ARM64
  • A Claude Pro, Max, Team, Enterprise or Console account — the free plan does not include Claude Code
  • Internet access
  • No Node.js required: the package ships a native binary

Anthropic’s officially tested Linux targets are Ubuntu 20.04+, Debian 10+ and Alpine 3.19+, but a signed RPM repository for Fedora/RHEL is published and supported. That is the method documented here.

Why dnf over the curl | bash native installer on Fedora:

dnfnative installer
Install scopesystem-wide (/usr/bin/claude)per-user (~/.local/bin/claude)
Signature verificationautomatic, on every updatemanual, via signed manifest
Updatesyour normal dnf upgrade workflowbackground auto-update
Requires sudoyesno

Pick one. See §4 if you already ran the native installer.


2. Install

Terminal window
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
Terminal window
sudo dnf install claude-code

On first install, dnf downloads the signing key and asks you to confirm the fingerprint. Verify it matches before accepting:

31DD DE24 DDFA B679 F42D 7BD2 BAA9 29FF 1A7E CACE

Channels

ChannelbaseurlBehaviour
stable (default above)https://downloads.claude.ai/claude-code/rpm/stableroughly one week behind, skips releases with major regressions
latesthttps://downloads.claude.ai/claude-code/rpm/latestevery release as soon as it ships

Switch channel at any time:

Terminal window
sudo sed -i 's|/rpm/stable|/rpm/latest|' /etc/yum.repos.d/claude-code.repo
Terminal window
sudo dnf clean metadata && sudo dnf upgrade claude-code

On a workstation you control, latest is usually the better trade — security and permission fixes reach you sooner. Keep stable on machines where an unexpected regression costs you a working day.

Upgrading

Terminal window
sudo dnf upgrade claude-code

Package-manager installs never auto-update. See §5 — this is the single most confusing part of the dnf method.


3. zsh configuration

3.1 PATH

The package installs to /usr/bin/claude, already on PATH. Nothing to configure.

(Only the native installer needs ~/.local/bin on PATH. Fedora’s /etc/zprofile sources /etc/profile, which normally adds it for login shells anyway.)

3.2 Refresh the command hash table

zsh caches command locations. After any install, upgrade or removal, if claude isn’t found or you get a stale binary:

Terminal window
rehash

3.3 Optional aliases

Terminal window
cat >> ~/.zshrc <<'EOF'
alias cc='claude'
alias ccc='claude --continue'
alias ccd='claude doctor'
EOF

Check with command -v before choosing a name, to avoid shadowing a real binary.


4. Migrating from a curl | bash native install

If you already ran curl -fsSL https://claude.ai/install.sh | bash, remove it before installing the RPM, or the two launchers will shadow each other.

Identify what you have:

Terminal window
which -a claude
Terminal window
claude doctor

Remove the native install:

Terminal window
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

Do not delete ~/.claude or ~/.claude.json — those hold your OAuth token, settings, MCP configuration and session history. The RPM picks them straight up, so you will not have to log in again.

Check whether the installer touched your shell files:

Terminal window
grep -n "claude" ~/.zshrc ~/.zprofile ~/.zshenv 2>/dev/null

Remove any alias or PATH line it added. Keeping ~/.local/bin on PATH is harmless and useful for other tools.

Confirm it’s gone, then install per §2:

Terminal window
rehash && command -v claude

A leftover global npm install can also shadow the RPM:

Terminal window
npm uninstall -g @anthropic-ai/claude-code

5. The misleading “Update available!” message

Symptom. The status bar at the bottom of a session shows:

Update available! Run: your package manager update command

…but sudo dnf upgrade claude-code answers Nothing to do., even after sudo dnf clean metadata and with the Claude Code repository loading correctly.

This is not a broken install. Two separate things are going on:

a) The message is a literal placeholder. Claude Code detects it was installed by a package manager and, rather than printing the concrete command, emits the generic string “your package manager update command”. It is cosmetic. On Fedora the command is always:

Terminal window
sudo dnf upgrade claude-code

b) The version check tracks latest, your repo tracks stable. The in-session notice compares your build against Anthropic’s release feed, which follows the latest channel. If your repo is configured for stable — roughly a week behind by design — a newer version genuinely exists upstream but is not yet in your repository. dnf is correct to report Nothing to do., and the banner will keep showing until stable catches up.

The docs also note a related timing issue: Claude Code may announce an update slightly before it lands in the package repository, on either channel.

Confirm what your repository actually offers:

Terminal window
dnf list --showduplicates claude-code
Terminal window
rpm -q claude-code

If the highest version listed equals your installed version, there is nothing to install. Ignore the banner.

Resolution — pick one

Option 1 — switch to the latest channel (recommended on a personal workstation):

Terminal window
sudo sed -i 's|/rpm/stable|/rpm/latest|' /etc/yum.repos.d/claude-code.repo
Terminal window
sudo dnf clean metadata && sudo dnf upgrade claude-code

Option 2 — stay on stable and silence the check. Add DISABLE_AUTOUPDATER to ~/.claude/settings.json (see §6). This stops only the background version check; dnf upgrade continues to work normally.

Option 3 — do nothing. The banner is informational and does not affect the session.

What does not work on Fedora

CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 makes Claude Code run the upgrade for you — but only for Homebrew and WinGet. apt, dnf and apk are deliberately excluded because those commands require elevated privileges. There is no supported way to have Claude Code run sudo dnf upgrade on your behalf.


6. Settings

User settings live in ~/.claude/settings.json, project settings in <project>/.claude/settings.json.

Working example:

{
"env": {
"DISABLE_AUTOUPDATER": "1"
},
"theme": "dark"
}

env holds environment variables; everything else sits at the top level.

Watch for trailing commas — strict JSON forbids them, and a trailing comma after the last key is the most common reason Claude Code rejects the file. Validate before restarting:

Terminal window
python3 -m json.tool ~/.claude/settings.json
Terminal window
claude doctor

claude doctor reports settings-file validation errors explicitly.

Note that /config inside a session also writes theme, so changing it there overwrites the value above.

DISABLE_AUTOUPDATER stops only the background check. To block every update path including claude update, use DISABLE_UPDATES instead.


7. Authenticate and verify

Terminal window
claude

A browser opens for OAuth login. If the localhost callback is blocked (headless, SSH, restrictive firewall), copy the printed URL into any browser and paste the returned code back into the terminal.

If ANTHROPIC_API_KEY is exported, Claude Code prompts once to approve that key instead of opening a browser. Unset it beforehand if you want the interactive login.

Terminal window
claude --version
Terminal window
claude doctor

claude doctor gives read-only diagnostics — install type, install health, settings validation, last update result. Run it first whenever something misbehaves.


8. Other Fedora gotchas

SELinux — Fedora’s default targeted policy does not interfere. If you suspect denials:

Terminal window
sudo ausearch -m avc -ts recent

ripgrep — bundled with the binary. If in-session search fails, install the system one and disable the builtin:

Terminal window
sudo dnf install ripgrep
{
"env": {
"USE_BUILTIN_RIPGREP": "0"
}
}

9. First useful action

Terminal window
cd ~/Projects/your-project
Terminal window
claude

Run /init in the session. It generates a CLAUDE.md describing the project so later sessions start with real context instead of rediscovering the architecture. Commit that file.


10. Uninstall

Terminal window
sudo dnf remove claude-code
sudo rm /etc/yum.repos.d/claude-code.repo

Configuration and history (destructive — settings, MCP config, session history):

Terminal window
rm -rf ~/.claude
rm -f ~/.claude.json

~/.claude/ is also written by the VS Code extension, the JetBrains plugin and the Desktop app. Uninstall those first or the directory reappears.


Sources

Changelog

  • 2026-07-18 — Reworked around dnf as the primary method. Added §4 (migrating from the native installer) and §5 (the misleading “Update available!” message). Verified on Fedora 44 / Claude Code 2.1.205.