3.1 Linux Users

For many Linux distributions, Rust might already be preinstalled or can be installed easily using the distribution's package manager. Examples include:

  • On Ubuntu or other Debian-based systems, install Rust with:

    sudo apt install rustc
    
  • On Fedora-based systems, use:

    sudo dnf install rust
    
  • On Gentoo Linux, consult Rust for Gentoo and use:

    emerge -av rust
    

However, to ensure you have the latest version of Rust and to easily manage multiple versions, it is often recommended to install Rust using the rustup tool. rustup provides the most current release of Rust and simplifies switching between versions.

To install Rust using rustup, follow the instructions on the official website or run the following command in your terminal:

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