Installing Rust with rustup
Install rustup
Rust's recommended installer is rustup. It manages compilers and standard tools.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Reload your shell
After install, restart the terminal or source the env file so cargo is on PATH.
source $HOME/.cargo/env
Check the tools
You should see version output for both the compiler and package manager.
rustc --version
cargo --version
Update later
- Run
rustup updateto get new stable releases - Use
rustup default stablefor everyday learning - Windows users can follow the rustup instructions at rust-lang.org
- rustup can also install clippy and rustfmt components
Comments
One comment per signed-in account. Comments are saved with this page’s URL.