Installing Rust on Ubuntu & Fedora

Mehul Patel
May 15, 2017 · 2 min read

Rust, commonly known as Rust-Lang, is a system programming language that is developed by Mozilla and backed by LLVM. Rust is known for preventing program crashes, memory leaks, and data races before it is compiled into binary, thus creating a highly-productive and stable programming environment. This article will show you how to install Rust onto Ubuntu 14.04 x64 & 16.04 x64 and Fedora box.

Let’s setup on Ubuntu :

System Update

Open terminal and run the following commands to ensure that package source list is upto date and also install curl

For Ubuntu 16.04

sudo apt update && sudo apt -y install curl

For Ubuntu 14.04

sudo apt-get update && sudo apt-get -y install curl

Install Rust

Installing Rust is a simple process. Run the following command to launch their installation script.

curl -sSf | sh

When the script finishes, Rust will be installed.

Verifying Rust

To verify that Rust was successfully installed on your Linux box, run rustc -V. You will see output similar to:

rustc 1.16.0 (30cf806ef 2017-05-10)

Let’s get started with Rust :

To use Rust, create a file called with your favorite text-editor and populate it with the following lines of code:

fn main() {
println!("Hello World!");

Running Hello World the “learning” way

Let’s setup on Fedora :

Install Rust

In order to install the Rust compiler, type:

$ sudo dnf install rust

This will install the compiler (rustc), standard library, gdb support and a documentation generator (rustdoc).

To compile the Rust source code, type:

$ rustc

This will produce an executable file named hello

Hope you enjoyed my blog. Don’t Forget To Share It With Your All Tech Friends..!! :)

Originally published at Rowdy’s Caf`e.

Mehul Patel

Written by

Tech Speaker | Linux Engineer | DevOps | OpenSource Enthusiast | Independent Researcher | Technical Writer | Explorer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade