Installing Rust with rustup

Updated

October 31, 2026

Installing Rust with rustup

The primary and official method for installing and managing Rust toolchains across all platforms is rustup.

Installing rustup

On Linux and macOS, install rustup via your terminal:

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

Follow the default prompts. This installs: - rustc: The Rust compiler. - cargo: The package manager and build system. - rustup: The toolchain multiplexer. - rust-std: Standard library binaries for your host architecture.

Managing Toolchains

Configure your shell environment:

source "$HOME/.cargo/env"
rustc --version
cargo --version

To update your toolchain to the latest stable release:

rustup update stable