Install Rust in Ubuntu 18

Rust is a fast performing programming language used for system programming, such as OS development, kernels, and drivers. It can also be used to implement higher-level languages such as JavaScript or Python. This article explains how to install Rust in Ubuntu 18 using the rustup tool.

Install Rust

  1. Start by downloading and running the rustup tool. Open a terminal and enter the following command:

    curl -sSf | sh
  2. The installer will automatically run after the download is complete.

    For the default install, type 1 and hit Enter.

    rust installer

  3. 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.

  4. After the install is complete you will see a confirmation message.

    rust install complete

  5. Note that the message mentions you need to log out/in for the PATH environment variable to reflect the changes. To avoid this, you can force a reload of your profile with the following command:

    . ~/.profile
  6. Rust includes a build tool and package manager called cargo. You can verify your Rust install using cargo to print the version details:

    cargo --version

    cargo version

This concludes the steps to install Rust in Ubuntu 18.