How to Install Rust on Fedora 44

Last updated Sunday, May 17, 2026 12:58 pm Joshua James 5 min read 2 comments

Fedora’s own Rust packages already stay close to upstream, but nightly toolchains, extra targets, and user-managed updates still point many developers toward rustup. That difference matters when you install Rust on Fedora for active development work. The toolchain provides rustc for compilation, while Cargo handles project creation, dependencies, builds, and tests from the same terminal workflow.

Fedora packages rust and cargo directly, and the official rustup installer works cleanly when you want the upstream toolchain manager instead. The current Fedora package and rustup stable toolchain both resolve to Rust 1.95.0. Both paths install Cargo, so you do not need a separate Cargo-only setup.

Install Rust on Fedora

Refresh package metadata first, then choose whether Fedora or rustup should manage the toolchain on this system.

sudo dnf upgrade --refresh

These commands use sudo for system-wide package management. If your account does not have sudo access yet, run the commands as root or follow the guide on how to add a user to sudoers on Fedora.

Install Rust on Fedora from the default repositories with sudo dnf install rust cargo, or use the official rustup installer when you want user-managed stable, beta, or nightly toolchains.

MethodChannelVersionUpdatesBest For
Fedora DNFFedora packages1.95.0 on Fedora 44dnf upgradeSystem-managed Rust, stable package maintenance, Fedora packaging parity
Official rustup installerrustup.rsCurrent stable, 1.95.0rustup updateStable, beta, or nightly toolchains, extra targets, upstream workflow

Pick one method unless you deliberately want both. Fedora packages and rustup can coexist, but rustc and cargo will follow whichever path wins on your PATH, which is why mixed installs often look inconsistent.

Fedora’s repositories and rustup both currently resolve to rustc 1.95.0. That keeps the DNF method suitable for stable work, while rustup remains the better fit when you need beta, nightly, extra targets, or upstream toolchain commands.

Fedora also packages a rustup bootstrap, but that RPM provides /usr/bin/rustup-init rather than a ready-to-use rustup command. Use the official installer below when you want the standard upstream rustup workflow.

The Rust toolchain is command-line software, so Fedora Server and minimal installs mainly differ in prerequisites. Minimal systems are more likely to need packages such as curl and gcc before the rustup path works cleanly.

Install Rust from Fedora DNF

Use Fedora’s packaged toolchain when you want system-managed Rust and Cargo through normal DNF maintenance.

Fedora packages Rust and Cargo separately, so install both packages together.

sudo dnf install rust cargo

Then check that both executables are available.

rustc --version && cargo --version
rustc 1.95.0 (59807616e 2026-04-14) (Fedora 1.95.0-1.fc44)
cargo 1.95.0 (f2d3ce0bd 2026-03-21) (Fedora 1.95.0-1.fc44)

This DNF path also brings in the compiler pieces a simple Cargo build needs, including gcc and make.

Install Rust with rustup on Fedora

Use rustup when you want the current stable toolchain, upstream documentation that matches your local compiler, or the option to add beta and nightly builds later.

Fedora Workstation usually already has curl, but Fedora Server and minimal installs are more likely to need the full prerequisite set. Install gcc here as well, because a clean rustup install on Fedora 44 fails with linker `cc` not found until the system C toolchain is present.

sudo dnf install curl gcc

curl downloads the installer, and gcc provides the cc linker many Rust crates expect. If one of your projects has a native dependency that builds with CMake, install CMake on Fedora separately. The curl command guide breaks down the download flags in more detail.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

The sh -s -- -y portion accepts the default stable toolchain without pausing at the installer menu. Rerun the same command without -y if you want to choose a different profile or default toolchain.

Load Rust into the current shell so the toolchain works immediately.

source "$HOME/.cargo/env"

Then verify the rustup-managed toolchain.

rustc --version && cargo --version
rustc 1.95.0 (59807616e 2026-04-14)
cargo 1.95.0 (f2d3ce0bd 2026-03-21)

rustup tracks the current stable release, so newer installs can show newer version numbers than this example. On Fedora 44, rustup resolved to Rust 1.95.0.

Create a Test Rust Project on Fedora

A quick project build proves more than a version check because it exercises Cargo, the compiler, and the local linker in one pass.

cargo new ~/hello-rust --bin
cd ~/hello-rust
cargo run --quiet
Hello, world!

If you want version control around the same workflow, install Git on Fedora before you start committing crates.

Update or Remove Rust on Fedora

Use the subsection that matches how Rust was installed. DNF and rustup manage different files, and mixing their maintenance commands makes version conflicts harder to trace.

Update Rust installed from Fedora DNF

When Rust came from Fedora packages, keep it current with a normal DNF upgrade.

sudo dnf upgrade --refresh rust cargo

Update Rust installed with rustup on Fedora

When Rust came from rustup, let rustup refresh both the stable toolchain and the manager itself.

rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: checking for self-update (current version: 1.29.0)
info: cleaning up downloads & tmp directories

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.95.0 (59807616e 2026-04-14)

Remove Rust installed from Fedora DNF

DNF removes unused compiler dependencies automatically when they were installed only for the Rust stack.

Use sudo dnf remove --noautoremove rust cargo instead if you want to keep shared development packages such as gcc and make.

sudo dnf remove rust cargo

Confirm that both Fedora packages are gone.

rpm -q rust cargo
package rust is not installed
package cargo is not installed

Remove Rust installed with rustup on Fedora

The official rustup installer includes a full uninstall path for the user-space toolchain.

rustup self uninstall -y
info: removing rustup home
info: removing cargo home
info: removing rustup binaries
info: rustup is uninstalled

That command removes the rustup toolchains and the PATH lines rustup added to your shell startup files.

rustup does not remove Fedora packages used as build prerequisites. Keep curl because many Fedora workflows use it, but remove gcc separately if you installed it only for Rust builds and no longer need native compilation.

sudo dnf remove gcc

Verify that the toolchain directories are gone.

for path in "$HOME/.cargo" "$HOME/.rustup"; do
  [ -e "$path" ] && echo "still present: $path" || echo "removed: $path"
done
removed: /home/your-user/.cargo
removed: /home/your-user/.rustup

Fix Common Rust Issues on Fedora

Fresh Fedora installs usually run into one of three issues: the current shell has not loaded the rustup PATH change yet, both installation methods are competing for rustc, or rustup is missing the system linker.

Fix rustup command not found on Fedora

If the current shell still prints bash: rustup: command not found or bash: rustc: command not found right after a rustup install, check whether $HOME/.cargo/bin is already on your PATH.

bash: rustup: command not found

This check uses grep -Fx to match the path exactly. The grep command guide covers that syntax in more detail.

echo "$PATH" | tr ':' '\n' | grep -Fx "$HOME/.cargo/bin"
/home/your-user/.cargo/bin

If that command returns nothing, load the environment file in the current shell.

source "$HOME/.cargo/env"

Then verify the toolchain again.

rustc --version && cargo --version
rustc 1.95.0 (59807616e 2026-04-14)
cargo 1.95.0 (f2d3ce0bd 2026-03-21)

Fix DNF and rustup path conflicts on Fedora

When both installation methods exist on the same machine, the shell can keep using Fedora’s /usr/bin/rustc even after rustup installs a toolchain under ~/.cargo/bin.

This quick check tells you which compiler wins in the current shell.

command -v rustc

rustup path:

/home/your-user/.cargo/bin/rustc

Fedora DNF path:

/usr/bin/rustc

If command -v rustc still prints /usr/bin/rustc and you want rustup to stay in control, remove the DNF packages and reload the shell.

sudo dnf remove --noautoremove rust cargo
source "$HOME/.cargo/env"

Fix linker cc not found on Fedora

A clean rustup install on Fedora 44 fails to compile even a hello-world project when the system C toolchain is missing.

   Compiling hello-rust v0.1.0 (/home/your-user/hello-rust)
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `hello-rust` (bin "hello-rust") due to 1 previous error

Install gcc, then rerun the project build.

sudo dnf install gcc

Confirm the project builds again.

cd ~/hello-rust
cargo run --quiet
Hello, world!

Conclusion

Rust is ready on Fedora with either system-managed packages or the upstream user-space toolchain from rustup. If your next crate needs version control, install Git on Fedora before committing changes, then keep The Rust Book nearby as you move from hello-world binaries into larger projects.

Follow LinuxCapable

Want more LinuxCapable guides in Google?

Add LinuxCapable as a preferred source so Google can show more of our fresh Linux tutorials in Top Stories and From your sources 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

2 thoughts on “How to Install Rust on Fedora 44”

  1. Congratulations for the excellent website and useful guides. For install Rust+cargo I use the default script: curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh. Alternatively in Fedora i use in the terminal:

    # Rust
    sudo dnf in -y rustup
    rustup-init -y
    # Completions for Fish – For other shell see: https://rust-lang.github.io/rustup/installation/index.html
    mkdir -p ~/.config/fish/completions && rustup completions fish > ~/.config/fish/completions/rustup.fish

    Reply
    • Thanks for the feedback and the alternative installation methods! Both the rustup.rs script and the DNF approach are great options. I appreciate you sharing the Fish shell completions tip as well. It’s always helpful to have multiple ways to set up Rust on Fedora. Thanks again for contributing!

      Reply
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
<blockquote>quote</blockquote> quote block

Got a Question or Feedback?

We read and reply to every comment - let us know how we can help or improve this guide.

Let us know you are human: