cargo installation

Linux

First run the command in the terminal: curl https://sh.rustup.rs -sSf | sh

This command get and execute a shell script from the certain website, which downloads the necessary tools and environments.

Here is the explanation of the flag of curl:

  • -s, shows no output.
  • -S, BUT error message.
  • -f, silent failure on HTTP errors, which means only return an error code instead of the whole messages.

then use the command below to source the environment: . ~/.cargo/env

Licensed under CC BY-NC-SA 4.0
Last updated on Nov 01, 2024 15:52 +0800