1-Open the terminal.
2-Update the package list by running the following command:
sudo apt update
3-Install the required dependencies by running the following command:
sudo apt install curl build-essential
4-Download the Rust installation script by running the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
5-Follow the on-screen instructions to complete the installation.
6-Restart the terminal or run the following command to apply the changes:
source $HOME/.cargo/env
7-Verify the Rust installation by running the following command:
rustc --version
This will display the installed Rust version.
For more detailed instructions, please refer to the official Rust documentation: Install Rust
or more detailed documents: Installation
To update Rust in Ubuntu, you can use the rustup
tool. Here's how to do it:
Open a terminal window.
Run the following command to update rustup
:
rustup update
Verify that Rust is updated to the latest version by checking the version number:
rustc --version
This should display the version of Rust that you have installed
You have successfully updated Rust in Ubuntu