Atlantic.Net Blog

How to Install Rust Programming Language on Oracle Linux 8

Rust is a free and open-source, multi-paradigm, general-purpose programming language developed by Mozilla. It is a server-side programming language designed for performance and safety, especially safe concurrency and memory management. It has direct access to hardware and memory, so it is an ideal language for embedded and bare-metal development. It is used to create a wide range of applications including game engines, operating systems, file systems, browser components, and more.

In this post, we will show you how to install Rust programming language on Oracle Linux 8.


  • A server running Oracle Linux 8 on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Oracle Linux 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install Required Dependencies

First, you will need to install some required dependencies on your server. You can install all of them by running the following commands:

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

Once all the dependencies are installed, you can proceed to the next step.

Step 3 – Install Rust on Oracle Linux 8

Rust provides an installation script to make the installation process easier.
You can run the following command to download and run the Rust installation script:

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

You will be asked to select the installation option as shown below:

home directory, located at:


This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory located at:


This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:


This path will then be added to your PATH environment variable by
modifying the profile files located at:


You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation

Type 1 and hit Enter to start the installation. Once the installation is complete, you will get the following output:

  stable-x86_64-unknown-linux-gnu installed - rustc 1.61.0 (fe5b13d68 2022-05-18)

Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source $HOME/.cargo/env

After the installation, activate the Rust system path variable using the following command:

source ~/.profile
source ~/.cargo/env

Next, verify the Rust version with the following command:

rustc -V

You should see the Rust version in the following output:

rustc 1.61.0 (fe5b13d68 2022-05-18)

Step 4 – Create Your First Rust Application

At this point, Rust is installed. Now, let’s create a sample application to test the Rust.

First, create a directory named project with the following command:

mkdir project

Next, change the directory to the project and create a sample Rust application with the following command:

cd project

Add the following code:

fn main() {
    println!("Welcome to Rust!");

Save and close the file, then compile the program using the following command:


This command will create an executable file in your current directory.

Now, run the program with the following command:


You should see the following output:

Welcome to Rust!

Step 5 – How to Update Rust Version

It is always a good idea to use the latest version of Rust. You can update it using the rustup command:

rustup update

Step 6 – How to Uninstall Rust

If you want to remove the Rust from your system, run the following command:

rustup self uninstall

After the successful uninstall, you will get the following output:

Thanks for hacking in Rust!

This will uninstall all Rust toolchains and data, and remove
$HOME/.cargo/bin from your PATH environment variable.

Continue? (y/N) y

info: removing rustup home
info: removing cargo home
info: removing rustup binaries
info: rustup is uninstalled


In this post, you learned how to install Rust programming language on Oracle Linux 8. You also learned how to create a sample application using Rust. You can now install Rust in your development environment and start creating your application using the Rust language. Try it on VPS hosting from Atlantic.Net!


Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year