Install Rust
| Install via rustup | |
| rustc --version and cargo --version | |
| Keep it updated | |
| Compile a check |
Install via rustup
The standard way to install Rust is rustup, the official toolchain manager.
Run the installer command below, accept the defaults, then restart the terminal so PATH picks up the new binaries.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
The installer adds rustc for compiling, cargo for projects, and rustup itself for updates.
rustc --version and cargo --version
A fresh install should answer with version numbers for both tools.
rustc --version
rustc 1.75.0
cargo --version
cargo 1.75.0
If a command is not found, open a new terminal window and check that the installer step finished without errors.
Keep it updated
Update the whole toolchain with one command whenever a new stable release appears.
rustup update
stable updated
Run the version commands from the previous section again to confirm the new numbers.
Compile a check
Finish with a final check that the compiler responds.
rustc --version
rustc 1.75.0
Next: cargo new
Article author: Arthur Isaev