Start by downloading and running the
rustuptool. Open a terminal and enter the following command:
curl https://sh.rustup.rs -sSf | sh
The installer will automatically run after the download is complete.
For the default install, type 1 and hit
The latest version of Rust will start downloading (at the time of writing the latest stable version is 1.33.0).
This will take a few minutes depending on your internet connection.
Note: If the download is interrupted, you can simply go back to step 1 above and you will have the option to continue with the installation.
After the install is complete you will see a confirmation message.
Note that the message mentions you need to log out/in for the
PATHenvironment variable to reflect the changes. To avoid this, you can force a reload of your profile with the following command:
Rust includes a build tool and package manager called
cargo. You can verify your Rust install using
cargoto print the version details:
This concludes the steps to install Rust in Ubuntu 18.