How To Install rust on Fedora 34

rust is The Rust Programming Language

Introduction

In this tutorial we learn how to install rust on Fedora 34.

What is rust

Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. This package includes the Rust compiler and documentation generator.

We can use yum or dnf to install rust on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install rust.

Install rust on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install rust using dnf by running the following command:

sudo dnf -y install rust

Install rust on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install rust using yum by running the following command:

sudo yum -y install rust

How To Uninstall rust on Fedora 34

To uninstall only the rust package we can use the following command:

sudo dnf remove rust

rust Package Contents on Fedora 34

/usr/bin/rustc
/usr/bin/rustdoc
/usr/lib/.build-id
/usr/lib/.build-id/37
/usr/lib/.build-id/37/b87ef156170a4394379896688c1c593e93230f
/usr/lib/.build-id/41
/usr/lib/.build-id/41/81441f01f6079b4448254ccd2be02f0873b734
/usr/lib/.build-id/6a
/usr/lib/.build-id/6a/48f2caee359d8f166415d475d7065d12a1733f
/usr/lib/.build-id/86
/usr/lib/.build-id/86/2f4596b605ba1060229eaa4f1ef48aa7ff1541
/usr/lib/.build-id/f7
/usr/lib/.build-id/f7/a01b1e0fe1df29831e87a3017eb1a7d4f056e7
/usr/lib/rustlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-ccb93ee701cefe54.so
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-b410eb5ba8910159.so
/usr/lib64/librustc_driver-1f0b62957ece923e.so
/usr/lib64/libstd-ccb93ee701cefe54.so
/usr/lib64/libtest-b410eb5ba8910159.so
/usr/share/doc/rust
/usr/share/doc/rust/README.md
/usr/share/licenses/rust
/usr/share/licenses/rust/COPYRIGHT
/usr/share/licenses/rust/LICENSE-APACHE
/usr/share/licenses/rust/LICENSE-MIT
/usr/share/man/man1/rustc.1.gz
/usr/share/man/man1/rustdoc.1.gz
/usr/bin/rustc
/usr/bin/rustdoc
/usr/lib/.build-id
/usr/lib/.build-id/37
/usr/lib/.build-id/37/fd4469071889fa038bb7f0d7c8a1074adfb646
/usr/lib/.build-id/57
/usr/lib/.build-id/57/d77567f1ecdf7d539c75a1ae366813547bcae7
/usr/lib/.build-id/bb
/usr/lib/.build-id/bb/1b97c35c8ee48caa487c8b967feed040a332df
/usr/lib/.build-id/dc
/usr/lib/.build-id/dc/f27d30e1ee81ec2ac4998aa60e650b8db1e3dc
/usr/lib/.build-id/fb
/usr/lib/.build-id/fb/ebbd056d2fe86ecf539fea5fb8c10fa5bc9746
/usr/lib/rustlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-f09f767385d3cb33.so
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-95117c375dcaf5f8.so
/usr/lib64/librustc_driver-bf7b2d8c812f80ce.so
/usr/lib64/libstd-f09f767385d3cb33.so
/usr/lib64/libtest-95117c375dcaf5f8.so
/usr/share/doc/rust
/usr/share/doc/rust/README.md
/usr/share/licenses/rust
/usr/share/licenses/rust/COPYRIGHT
/usr/share/licenses/rust/LICENSE-APACHE
/usr/share/licenses/rust/LICENSE-MIT
/usr/share/man/man1/rustc.1.gz
/usr/share/man/man1/rustdoc.1.gz

References

Summary

In this tutorial we learn how to install rust on Fedora 34 using yum and dnf.