This article guides you on how to install the latest Rust programing language on a Linux system. Whether it is your desktop or server. The guide universally works with all Linux distributions so it doesn’t matter whether you use Ubuntu, CentOS, Fedora, RHEL, Arch, or any other. Just follow along and you will be able to install the latest Rust programing language build on your Linux system.
Rust is a general-purpose, cross-platform program language. It supports multi-paradigm and is designed for performance, safety, and concurrency. Rust is blazingly fast and memory-efficient with no runtime or garbage collector, it is best suited for performance-critical services and can run on embedded devices.
The language is used by hundreds of companies around the world. Rust makes the production fast and low-resource intensive while providing cross-platform solutions. Rust is being used from startups to large companies.
Some of the famous companies that love 😍 Rust are Dropbox, Firefox, Google, and Cloudflare.
Now let’s see, how to get this little bad boy up and running on your Linux system 🐧.
Installing Rust programing language on Linux
Before installing Rust on your Linux system, you need to get some of the tools 🛠️ that will make the installation processing effortless. However, there are stronger chances that your system might already have these tools but anyway here is how you can get them.
For Ubuntu, Debian and their derivatives
sudo apt-get install curl cmake
For Fedora, RHEL, CentOS, Rocky Linux
sudo dnf install curl cmake
Note: If dnf is not found then it can also be installed.
sudo yum install dnf
For Arch, Manjaro or their derivatives
sudo pacman -S curl cmake
Now it’s time to get Rust on your Linux
To install rust, we will be using rustup. It is a script that makes Rust installation a breeze. To get the script, we first need to download it with curl then execute it to install Rust.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
FYI: This script works not only on Linux but on macOS and other Unix-like OS as well.
While installing the Rust, you will come across installation options, simply choose the 1st option and hit enter to continue.
After it completes the installation, you need to make the system aware of the Rust so source the Rust environment variable configurations.
source $HOME/.bashrc // This is only for bash shell users
Now you can verify by executing any Rust-related command.
Rust is a very powerful and efficient language, I hope you have successfully installed and configured it on your Linux system. Let me know if you get into anything unusual in the comments below. And subscribe to the LinuxH2O Youtube channel to show your support 🦸♂️.