About this Install Guide

This guide is intended to get you up and running with this tool quickly with the most common settings. For a thorough review of all options, refer to the official documentation.

Rust is an open source programming language.

Before you begin

Rust is available for a variety of operating systems and Linux distributions and has multiple ways to install it.

This article provides a quick solution to install Rust on an Arm Linux distribution.

Confirm you are using an Arm machine by running:

    

        
        
            uname -m
        
    

The output should be:

    

        
        aarch64

        
    

If you see a different result, you are not using an Arm computer running 64-bit Linux.

Installation

Installing dependencies on Debian based distributions such as Ubuntu

Use the apt command to install the required software packages on any Debian based Linux distribution, including Ubuntu.

    

        
        
            sudo apt update -y
sudo apt install -y curl gcc
        
    

Installing dependencies on Red Hat / Fedora / Amazon Linux

These Linux distributions use yum as the package manager.

Use the yum command to install the required software packages. If the machine has sudo you can use it.

    

        
        
            sudo yum update -y
sudo yum install -y curl gcc
        
    

Download and install Rust

Run the following command to download and install Rust:

    

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

The installer output will be similar to:

    

        
        info: downloading installer
info: profile set to 'default'
info: default host triple is aarch64-unknown-linux-gnu
info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
info: latest update on 2023-06-01, rust version 1.70.0 (90c541806 2023-05-31)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 13.6 MiB /  13.6 MiB (100 %)   8.2 MiB/s in  1s ETA:  0s
info: installing component 'rust-std'
 32.8 MiB /  32.8 MiB (100 %)  12.6 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 75.5 MiB /  75.5 MiB (100 %)  17.7 MiB/s in  4s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'

  stable-aarch64-unknown-linux-gnu installed - rustc 1.70.0 (90c541806 2023-05-31)


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"

        
    

The latest version of Rust is now installed.

The installer updates $HOME/.bashrc and SHOME/.profile to setup the environment. Start a new shell or run the following command to continue:

    

        
        
            source "$HOME/.cargo/env"
        
    

To confirm the installation is complete run cargo version (cargo is the Rust package manager):

    

        
        
            cargo version
        
    

The command will print the version:

    

        
        cargo 1.70.0 (ec8a8a0ca 2023-04-25)

        
    

You are ready to use the Rust programming language on your Arm Linux machine.

Get started

To compile an example program, run the following commands:

    

        
        
            cargo new hello
cd hello
cargo run
        
    

The cargo run command will output:

    

        
           Compiling hello v0.1.0 (/hello)
    Finished dev [unoptimized + debuginfo] target(s) in 0.44s
     Running `target/debug/hello`
Hello, world!

        
    

Feedback

How would you rate the overall quality of this tool quick-install guide?