How to Install Claude Code CLI on Fedora 44

Install Claude Code CLI on Fedora 44 Linux with Anthropic's native installer. Covers login, PATH fixes, updates, removal, and cleanup steps.

Last updatedAuthorJoshua JamesRead time9 minGuide typeFedora

Working inside a Fedora terminal is easier when the same tool can inspect files, answer repository questions, run commands, and propose edits without moving the project into a browser tab. To install Claude Code on Fedora, choose between Anthropic’s native installer for a user-local CLI or Anthropic’s RPM repository for a package-managed system install.

Fedora’s own repositories still do not provide a Claude Code package, so sudo dnf install claude is not the right command. The DNF method uses Anthropic’s third-party repository and installs the package named claude-code. Claude Code also needs internet access, 4 GB or more of RAM, an x64 or ARM64 system, and a Claude Pro, Max, Team, Enterprise, Console, or supported cloud-provider account. The free Claude.ai plan does not include Claude Code access.

Install Claude Code on Fedora

Choose one installation method and keep update and removal work tied to that same method. The native installer is the best default for most individual Fedora users because it follows Claude Code’s background updater. The DNF repository fits systems where package-manager inventory, repeatable setup, or managed rollouts matter more.

MethodSource or ChannelUpdatesBest ForTrade-offs
Native installerAnthropic setup docsClaude Code background updaterMost Fedora Workstation, Server, SSH, and user-local installsInstalls under the user’s home directory, so PATH fixes may be needed
Anthropic DNF repositoryAnthropic RPM repositorydnf package upgradesPackage-managed Fedora systems and scripted deploymentStable channel by default, with manual repository setup and root privileges required

If you searched for a Claude Code download for Fedora, avoid manually downloading a random RPM, AppImage, or tarball. The Fedora paths covered here are the native installer and Anthropic’s Linux package repository; npm appears only for cleanup or troubleshooting older installs.

If you searched for Claude Desktop on Fedora, that is a different product surface from the terminal CLI. Anthropic’s Desktop documentation currently lists macOS and Windows downloads and states that the Desktop app is not available on Linux. Fedora users should use the Claude Code CLI, the web interface, an IDE integration, or remote SSH access from a supported desktop.

Fedora Atomic desktops such as Silverblue, Kinoite, and other rpm-ostree systems do not follow the same host package workflow as mutable Fedora Workstation or Server installs. Use the native installer for a per-user CLI unless you intentionally manage host layering and reboots with rpm-ostree.

Install Claude Code with the Native Installer

The native installer places the claude launcher under ~/.local/bin and stores versioned binaries under ~/.local/share/claude. It does not require Node.js, npm, or a Fedora package named claude-code. Install the curl command in Linux first if your Fedora image does not already include it.

sudo dnf upgrade --refresh
sudo dnf install curl

These commands use sudo for package-management tasks. If your account cannot run sudo yet, add the account to Fedora’s wheel group with the guide on how to add a user to sudoers on Fedora.

Run Anthropic’s native installer:

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

Example output pattern includes the selected release channel and launcher path. The exact version changes as Anthropic publishes new builds.

Setting up Claude Code...
Installing Claude Code native build latest...
Setting up launcher and shell integration...
Claude Code successfully installed!

  Version: 2.1.x
  Location: ~/.local/bin/claude

Confirm that Fedora can see the user-local binary directory in your current shell:

printf '%s\n' "$PATH" | tr ':' '\n' | grep -Fx "$HOME/.local/bin"

Example output pattern:

/home/username/.local/bin

No output means the directory is missing from PATH. Add it to Bash in a rerun-safe way, then reload the shell:

touch ~/.bashrc
grep -qxF 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Zsh users can place the same export line in ~/.zshrc after they install Zsh on Fedora.

Verify the native install:

claude --version
which -a claude

Example output pattern:

2.1.x (Claude Code)
/home/username/.local/bin/claude

The native installer accepts a release channel. Use one channel command, not both. The stable channel is delayed and can skip releases with major regressions:

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

Use the latest channel when you want the newest Claude Code builds as soon as Anthropic ships them:

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

Install Claude Code with the Anthropic DNF Repository

The DNF repository is useful when you want Fedora to track Claude Code as an installed RPM, place the launcher in /usr/bin/claude, and update the CLI through normal package upgrades. Anthropic publishes RPM repository metadata for x86_64 and aarch64.

Create the repository file for Anthropic’s stable channel:

printf '%s\n' \
  '[claude-code]' \
  'name=Claude Code' \
  'baseurl=https://downloads.claude.ai/claude-code/rpm/stable' \
  'enabled=1' \
  'gpgcheck=1' \
  'repo_gpgcheck=0' \
  'gpgkey=https://downloads.claude.ai/keys/claude-code.asc' |
  sudo tee /etc/yum.repos.d/claude-code.repo >/dev/null

Replace /rpm/stable with /rpm/latest in the repository file before installing if you want the rolling latest channel instead of the delayed stable channel.

Install the package from the new repository:

sudo dnf install claude-code

DNF downloads Anthropic’s signing key during the first install. Accept the key only if the fingerprint shown by DNF matches this value:

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

Verify both the CLI and the installed RPM package:

claude --version
rpm -q claude-code
command -v claude

Example output pattern:

2.1.x (Claude Code)
claude-code-2.1.x-1.x86_64
/usr/bin/claude

If dnf install claude-code returns “No match for argument,” check the repository file and package name. Fedora’s default repositories do not contain the package, and claude is the command name, not the RPM package name.

Authenticate Claude Code on Fedora

Claude Code needs an account before it can read project context, send prompts, or apply changes. Claude Pro, Max, Team, Enterprise, Claude Console, Amazon Bedrock, Google Vertex AI, and Microsoft Foundry accounts use different authentication paths, but the normal individual flow starts from the terminal.

Sign In to Claude Code

Open a terminal in the repository where you want Claude Code to work, then start an interactive session:

cd ~/your-project
claude

Claude Code opens a browser login flow on first launch. If no browser appears, press c to copy the login URL and open it manually. On Fedora Server, over SSH, or in a headless VM, open that URL in a browser on your workstation and paste the login code back into the terminal when prompted.

Cloud-provider accounts do not use the same browser-based Claude.ai flow. Set the required provider environment variables for Amazon Bedrock, Google Vertex AI, or Microsoft Foundry before running claude.

Check Claude Code Authentication Status

Use the CLI status command when you want to confirm whether the current shell is authenticated:

claude auth status --text

A logged-out shell exits with status 1, while a logged-in shell exits with status 0. You can also start or reset authentication directly from the shell:

claude auth login
claude auth logout

Use Claude Code on Fedora

After installation and login, Claude Code behaves like a terminal-native coding assistant instead of a generic chat page. Start in a project directory, give it a concrete task, and review proposed file changes before accepting them.

Start a Claude Code Session

Launching claude in a repository starts the interactive session most Fedora users need day to day:

cd ~/your-project
claude

Type /help to list built-in commands, or use /init to create a project-level CLAUDE.md file that explains your repository layout and coding conventions.

Use Common Claude Code Commands

These commands cover the first workflows most Fedora users need after installation:

CommandWhat It Does
claudeStarts an interactive session in the current project
claude -p "explain this function"Runs one non-interactive prompt and exits
claude -cContinues the most recent conversation in the current directory
claude -rOpens the resume picker or resumes a session when you provide an ID
claude updateUpdates a native install on its configured channel
claude auth status --textShows whether the current shell is authenticated
/helpShows available slash commands inside an interactive session
/statusShows version, account, and active configuration sources inside a session

Try First Claude Code Prompts

Start with read-only prompts when you are learning a new repository:

what does this project do?
what technologies does this project use?
where is the main entry point?
explain the folder structure

Move to small, reviewable changes after Claude Code has inspected the project:

review my changes and suggest improvements
write unit tests for the calculator functions
update the README with installation instructions

When you only need one answer without staying in the interactive session, use print mode:

claude -p "Explain the authentication flow in this repository"
claude -c -p "Continue with the next failing test"

Update Claude Code on Fedora

Update Claude Code with the same toolchain you used for installation. Native and DNF installs do not share update state, so mixing update commands is a common source of version confusion.

Update a Native Claude Code Install

Native installations check for updates in the background, but you can trigger an immediate update on the configured channel:

claude update

Use the interactive configuration screen if you want to switch between the latest and stable native channels:

claude
/config

Update a DNF Claude Code Install

DNF repository installs update through Fedora’s package manager. Use a package-specific upgrade when you only want to refresh Claude Code:

sudo dnf upgrade --refresh claude-code

Confirm the package version and launcher path after the upgrade:

rpm -q claude-code
command -v claude

Remove Claude Code from Fedora

Removal is method-specific. Remove the native files for a user-local install, or remove the RPM and repository file for a DNF install. If claude still runs afterward, use the which command in Linux to find another installation earlier in PATH.

Remove a Native Claude Code Install

Remove the native launcher and versioned binaries:

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

Claude Code settings, credentials, MCP configuration, and session history live separately.

Deleting these files removes local Claude Code settings, credentials, MCP server configuration, session history, and project-level Claude Code state for the current account or project. Back up anything you still need before running the cleanup commands.

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

# Run these from a project that used Claude Code
rm -rf .claude
rm -f .mcp.json

Remove a DNF Claude Code Install

Remove the RPM package first:

sudo dnf remove claude-code

Then remove Anthropic’s repository file if you created it for the DNF method:

sudo rm -f /etc/yum.repos.d/claude-code.repo

Verify that the repository is no longer enabled and clear the shell command cache before checking for the launcher:

rpm -q claude-code || echo "Claude Code RPM removed"
dnf repo list --enabled | grep -E '^claude-code' || echo "Claude Code repository is not enabled"
hash -r
command -v claude || echo "Claude Code command removed"

DNF also imports the Claude Code RPM signing key during the first install. Leave the key in place if you plan to reinstall Claude Code later, if the RPM is still installed, or if another repository still references it. For full cleanup after the package and repository are gone, remove the key only when no repo file still points to it:

if rpm -q claude-code >/dev/null 2>&1; then
  echo "Claude Code RPM is still installed"
elif grep -Rqs 'downloads.claude.ai/keys/claude-code.asc' /etc/yum.repos.d /etc/dnf/repos.override.d 2>/dev/null; then
  echo "A Claude Code repository still references this key"
elif rpm -q gpg-pubkey --qf '%{VERSION}\n' | grep -qi '^31ddde24ddfab679f42d7bd2baa929ff1a7ecace$'; then
  sudo rpmkeys --delete 31ddde24ddfab679f42d7bd2baa929ff1a7ecace
else
  echo "Claude Code RPM key is not installed"
fi

Remove an Older npm Claude Code Install

The npm package is still available for users who already manage global developer tools with Node.js 18 or newer, but Fedora users do not need npm when using the native installer or the DNF repository. Remove the older global package if it is shadowing your preferred install.

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

Then confirm which launcher Fedora resolves first:

which -a claude

Troubleshoot Claude Code on Fedora

Most Fedora-side problems come from PATH order, missing repository setup, network blocks, old npm installs, or authentication state.

Fix claude Command Not Found on Fedora

A native install uses ~/.local/bin/claude, while a DNF install uses /usr/bin/claude. Check both the PATH entry and the actual launcher path:

printf '%s\n' "$PATH" | tr ':' '\n' | grep -Fx "$HOME/.local/bin"
ls -l ~/.local/bin/claude 2>/dev/null
ls -l /usr/bin/claude 2>/dev/null

If the native launcher exists but PATH is missing ~/.local/bin, add the PATH export to your shell profile and reload the shell:

touch ~/.bashrc
grep -qxF 'export PATH="$HOME/.local/bin:$PATH"' ~/.bashrc || echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

If neither launcher exists, reinstall with the native installer or the DNF repository and then run claude --version.

Fix DNF Package Not Found for Claude Code

sudo dnf install claude-code only works after Anthropic’s repository file exists and is enabled. sudo dnf install claude fails because claude is the command name, not the RPM package name.

test -f /etc/yum.repos.d/claude-code.repo && echo "Repository file exists" || echo "Repository file is missing"
dnf repo list --enabled | grep -E '^claude-code' || echo "Claude Code repository is not enabled"

If the checks report a missing file or disabled repository, recreate /etc/yum.repos.d/claude-code.repo with the repository command and run the install command again.

Fix Claude Code Download or Network Errors

The current native installer downloads release metadata and binaries from downloads.claude.ai. Test that endpoint directly before changing Fedora packages:

curl -fsSI https://downloads.claude.ai/claude-code-releases/latest
HTTP/2 200

No response, DNS errors, TLS errors, or proxy failures usually point to a network, firewall, corporate proxy, regional access, or CA certificate issue. After network access is restored, rerun the native installer if you used the native method:

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

For the DNF repository method, refresh repository metadata and retry the package install:

sudo dnf makecache --refresh
sudo dnf install claude-code

Fix npm Native Binary Errors

If an older npm install reports a missing native binary package, the npm client or mirror likely skipped Claude Code’s platform-specific optional dependency. The simplest Fedora fix is to remove the npm package and use the native installer or DNF repository instead.

npm uninstall -g @anthropic-ai/claude-code
curl -fsSL https://claude.ai/install.sh | bash

If you intentionally keep the npm method, reinstall without --omit=optional, --ignore-optional, or npm configuration that disables optional dependencies. Do not use sudo npm install -g; fix the npm global prefix or use one of the non-npm methods instead.

Fix Authentication Problems on Fedora

Check the active authentication state before reinstalling Claude Code:

claude auth status --text

If browser login succeeds but Claude Code still authenticates with the wrong organization, list matching environment variable names without printing token values:

env | cut -d= -f1 | grep -E '^ANTHROPIC_|^CLAUDE_CODE_' || echo "No Claude-related environment variables found"

For normal subscription login, start by unsetting stale API key or bearer-token overrides. Leave provider or OAuth-token variables in place when your organization intentionally uses them.

unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN
claude auth login

Conclusion

Claude Code is available in Fedora’s terminal through either a user-local native install or Anthropic’s RPM repository. Once claude --version works and authentication is active, pair the CLI with install Git on Fedora and install Visual Studio Code on Fedora for a fuller local development setup.

Share this guide

Help another Linux user troubleshoot faster

Share this guide with someone troubleshooting Linux systems or saving it for later.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show our tutorials more often in Top Stories and mark them as preferred in AI Mode and AI Overviews when relevant.

Add LinuxCapable as a preferred source on Google
Search LinuxCapable

Need another guide?

Search LinuxCapable for package installs, commands, troubleshooting, and follow-up guides related to what you just read.

Found this guide useful?

Support LinuxCapable to keep tutorials free and up to date.

Buy me a coffeeBuy me a coffee
Before commenting, please review our Comments Policy.
Formatting tips for your comment

You can use basic HTML to format your comment. Useful tags currently allowed in published comments:

You type Result
<code>command</code> command
<strong>bold</strong> bold
<em>italic</em> italic
<a href="https://example.com">link</a> link
<blockquote>quote</blockquote> quote block

Add to the discussion

Questions, fixes, command output, and version notes help keep this guide current.

Verify before posting: