Rust programming language is a multi-paradigm system programming language by Mozilla that focuses on having the best features of the C++ and Python languages with a focus on security.

Rust was designed to be a safe, concurrent, and practical language. It aims to ensure memory safety while still maintaining performance, without needing any garbage collector or runtime, thus making it possible to use Rust as an embedded system’s primary programming language. As such, Rust is used in many single-board computers, including Raspberry Pi and BeagleBone Black.

The language has found use in web development, being used in the Firefox web browser’s rendering engine and the Servo parallel layout engine. Rust is also being used to develop WebAssembly, a new standard for compiling code to run in web browsers. This makes it possible to write high-performance code that can run in any web browser without the need for a plugin.

In conclusion, Rust is a powerful, safe and fast programming language that is becoming increasingly popular in many different industries. It provides many features that are not found in other languages, making it a great choice for development projects of all sizes.

In this tutorial, we will show you how to install and configure the Rust Programming Language on AlmaLinux 8. We will also create a Hello World example to show you how to get started with Rust.


In order to install the Rust Programming Language on AlmaLinux 8, you must have:

  • Root access on your server or virtual machine.
  • A server with a minimum of 2 GB RAM and 20 GB of hard disk to smooth out the installation process.

Updating the System

Before installing any software on your system, it is always a good idea to update the packages and repositories. You can do this by running the following command.

sudo dnf check-update && sudo dnf update -y

Once the command finishes, run the command below to install required dependencies.

sudo dnf install curl epel-release cmake gcc make -y

Installing Rust on AlmaLinux 8

Now that the system has been updated, we are ready to install the Rust Programming Language.

We will use curl to download a script that will install the latest version of rust in our system using the DNF package manager. Thanks to the developer team, we can simply install Rust system-wide by typing the commands below.

curl --proto '=https' --tlsv1.2 -sSf | sh

This command will download the script from the Rust project’s website and execute it using the sh shell.

Sample output: script

Once the installation is finished, run the command below to update the PATH environment variable.

source ~/.profile

Next. run the command below to update the CARGO environment variable.

source ~/.cargo/env

Finally, open a new terminal window and type the rustc command with the -V flag to verify that Rust has been installed correctly. Rustc is the compiler for the Rust Programming Language.

rustc -V

The output should be something like this. This output shows that you have Rust installed in your system.

Now that we’ve successfully installed the Rust Programming Language, let’s take a look at how to create a Hello World example.

Check Rust version

Testing the Installation

Now that Rust has been installed, let’s create a basic “Hello World” program to test the installation.

First, let’s create a new directory to put our new Rust project in our home directory.

cd && mkdir hello_world

Next, switch to this directory using the cd command.

cd hello_world

Then, create a file called with nano or your favorite text editor.

sudo nano

After the file has been opened, copy and paste the following code.

fn main() {
  println!("Hello World, this is an example provided by");


  • fn main() {}: This is the main() function, which is where our program will run.
  • println!(“Hello World, this is an example provided by”);: This line prints “Hello World” to the console.
  • }: The closing bracket for the main() function.

If you are running this within an SSH session, it is important to close nano by pressing CTRL+X, Y, and Enter.

Now, compile the program using the rustc command and pass in the file name as the only argument.


Once the program has compiled successfully, you will notice that there are now two new files in our directory; one is called “” and the other executable file named “hello_world”. This executable file can be run on its own and on any system that has Rust installed.

Rust test script

To run the program, type the following command in your terminal.


The program will print exactly what you expect to see “Hello World, this is an example provided by”. Congratulations! You have successfully installed and tested the Rust Programming Language on your AlmaLinux system.

There are many resources online where you can go to learn more about this programming language. You can refer to its official website where contains all of the information you need to get started, including documentation, guides, and a community forum. There are also many books about Rust that can be found on Amazon or other online bookstores. Lastly, there are many video tutorials available on YouTube that can walk you through different aspects of the language.


In this article, we have shown you how to install Rust on AlmaLinux 8. We have also created a basic “Hello World” program to test the installation. Leave a comment below and let us know if you have any questions or need help.

How to Install Rust Programming Language on AlmaLinux 8

Karim Buzdar

About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. You can reach Karim on LinkedIn