How To Install Rust Programming Language On Linux (Ubuntu) | HackerNoon (2024)

This tutorial is a segment of an article designed to help web 2.0 developers comprehend concepts like decentralization, centralization, blockchain, and the associated tools (Vara Network & Gear Protocol). However, if your goal is solely to install the Rust programming language, this guide is still applicable.

Prerequisites

To successfully follow this tutorial, you should have a Ubuntu 20.04 server with a non-root user granted sudo privileges, as well as a configured firewall.

Method of Installation

There are two methods by which Rust can be installed on your System. The first method will be using Ubuntu APT (Advanced Package Tool). It is a command-line tool for managing software packages on your system. With APT, you can install, upgrade, remove, and manage software packages.

The second method will be to use the curl to complete the installation. Curl is a command-line tool and library for transferring data with URLs. It allows you to interact with various network protocols to download or upload data, making it a versatile tool for working with web services and APIs.

System Updates &Upgrade

Firstly, I recommend that whenever you want to install any package at all, it is best practice to first check and install updates and upgrades to the system before continuing with the installation.

sudo apt update && sudo apt upgrade -y

When you run sudo apt update && sudo apt upgrade -y, you first update the package lists to get the latest information about available software packages. Then, if the update is successful, it proceeds to upgrade the installed packages to their latest versions, automatically confirming the upgrades to avoid manual intervention. This is a common and recommended practice to keep your Linux system up-to-date and secure.

Essential dependencies.

The command below installs essential development tools (build-essential, gcc, and make) and the curl utility for making HTTP requests and downloading files. These packages are commonly required for software development, compilation, and system administration tasks.

 sudo apt install curl build-essential gcc make -y

Method 1: Usingapt

After successfully installing the commands mentioned above, we can proceed with the installation of our favorite programming language. Execute the following command in your terminal:

sudo apt install rustc 

The above command you run will install the Rust Language successfully, and to verify the installation, run the next command. First verification rustc -V Expected output:

rockyessel@UBUNTU-ROCKY:~$ rustc -V rustc 1.73.0 (cc66ad468 2024-02-07)

Once the output is similar to mine, then you have successfully installed Rust on your system.

Method 2: UsingCURL

Since I have explained to you what the curl is, let's dive straight into the installation.

 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh 

In the installation process, you'll be prompted a question: go with the default when it happens.

1. Proceed with installation (default) --> Enter2. Customize installation3. Cancel installation.

After this prompt, you have successfully installed Rust on the Ubuntu System. Now the next step is to restart your terminal, simply close the current terminal. Open a new one, and run the command below.

source "$HOME/.cargo/env" 

What this command source "$HOME/.cargo/env" does is to activate the Rust environment. The reason is that the Rust environment comprises essential variables and configurations required for effective Rust usage. Now, once run, there's no output, so you can verify the installation by running the command below.

 rustc -V

Expected output:

rockyessel@UBUNTU-ROCKY:~$ rustc -V rustc 1.73.0 (cc66ad468 2024-02-07)

Preferred Approach: While both methods outlined above effectively install Rust on your system, it's important to note the preferred option. According to the Ubuntu blog's web application and Rust itself, the recommended method is to utilize CURL. However, it's worth mentioning that you have the flexibility to opt for either method, as they achieve the same result.

Conclusion

Having successfully installed Rust, you are now equipped to delve into its robust capabilities. Let's seamlessly transition to the next phase of exploring decentralization(You and I, we code).

Also published here.

How To Install Rust Programming Language On Linux (Ubuntu) | HackerNoon (2024)
Top Articles
How to succeed in affiliate marketing (Guide) | Post Affiliate Pro
I'm 55 With $2 Million and $6k in Monthly Expenses. Can I Retire?
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Pearson Correlation Coefficient
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Nfsd Web Portal
Selly Medaline
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 5829

Rating: 5 / 5 (80 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.