How to Install Rust on Ubuntu 25.10

Rust is a modern, multi-paradigm programming language focused on performance, safety, and concurrency. It guarantees memory-safety without needing a garbage collector, relying on its ownership model instead.

Install Rust via rustup

Download and run the installer for the official Rust toolchain (which will install the latest stable version, currently v1.90.0).

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

Follow the on-screen prompts. Choose option 1 to proceed with the standard installation, which will install rustc, cargo, rustup, and related components.

After installation you may need to source your shell environment:

source "$HOME/.cargo/env"

Verify the Installation

Check that the compiler is installed and reports the expected version:

rustc --version

Output:

rustc 1.90.0 (1159e78c4 2025-09-14)

Install Build-Essential (Optional, for compiling C dependencies)

sudo apt update && sudo apt install -y build-essential

Create, Compile and Run a Test Program

Create a directory for your Rust test:

mkdir ~/rustprojects && cd ~/rustprojects
mkdir testdir && cd testdir
nano test.rs

Inside test.rs, write:

fn main() {
    println!("Congratulations! You have installed Rust and it works.");
}

Compile and run:

rustc test.rs
./test

You should see:

Congratulations! You have installed Rust and it works.

Update Rust Toolchain

To update to the latest stable version when available:

rustup update stable

Done

You have now installed the latest stable Rust (v1.89.0) on Ubuntu 25.10. You are ready to build Rust applications, manage dependencies with Cargo, and explore Rust’s ecosystem and tooling.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS