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 Become Rich Fast: (12 Ways to Grow Your Money)
Old Money vs New Money: Behaviors and Habits
Terrorist Usually Avoid Tourist Locations
PRISMA Technik 7-10 Baden-Württemberg
Jennette Mccurdy And Joe Tmz Photos
Marist Dining Hall Menu
Think Of As Similar Crossword
What is the surrender charge on life insurance?
Best Restaurants Ventnor
123Moviescloud
Chris Hipkins Fue Juramentado Como El Nuevo Primer Ministro De...
SXSW Film & TV Alumni Releases – July & August 2024
2 Corinthians 6 Nlt
Powerball winning numbers for Saturday, Sept. 14. Check tickets for $152 million drawing
How Much You Should Be Tipping For Beauty Services - American Beauty Institute
Silive Obituary
Nhl Tankathon Mock Draft
Little Caesars 92Nd And Pecos
Amazing deals for Abercrombie & Fitch Co. on Goodshop!
Reptile Expo Fayetteville Nc
Vegito Clothes Xenoverse 2
Parc Soleil Drowning
3 2Nd Ave
Used Patio Furniture - Craigslist
City Of Durham Recycling Schedule
3569 Vineyard Ave NE, Grand Rapids, MI 49525 - MLS 24048144 - Coldwell Banker
Rugged Gentleman Barber Shop Martinsburg Wv
Claio Rotisserie Menu
Bfsfcu Truecar
Big Boobs Indian Photos
Sacramento Craigslist Cars And Trucks - By Owner
950 Sqft 2 BHK Villa for sale in Devi Redhills Sirinium | Red Hills, Chennai | Property ID - 15334774
Vip Lounge Odu
Springfield.craigslist
Old Peterbilt For Sale Craigslist
Timothy Kremchek Net Worth
11 Pm Pst
The Boogeyman Showtimes Near Surf Cinemas
Scottsboro Daily Sentinel Obituaries
The disadvantages of patient portals
Trivago Sf
Tripadvisor Vancouver Restaurants
Sofia With An F Mugshot
30 Years Of Adonis Eng Sub
Ehome America Coupon Code
Gary Vandenheuvel Net Worth
Stoughton Commuter Rail Schedule
St Als Elm Clinic
Worlds Hardest Game Tyrone
Guidance | GreenStar™ 3 2630 Display
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.