Install Rust in Ubuntu
Use rustup, the official Rust installer for Linux/Unix. On Ubuntu:
sudo apt update
sudo apt install -y curl build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Then load Rust into your current shell:
source "$HOME/.cargo/env"