Linux and macOS
Run the installer in your terminal. It downloads rustup and sets up the stable toolchain for your user account.
# Linux or macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Get the full Rust toolchain in a single command. The rustup installer manages the compiler, Cargo, and the standard library, and keeps everything up to date.
rustup is the recommended way to install Rust. It installs the stable toolchain and gives you a single command to switch versions, update, and uninstall.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
After installing, add the toolchain to your current shell with source "$HOME/.cargo/env", or simply open a new terminal.
The same rustup toolchain works everywhere. Choose the instructions that match your operating system.
Run the installer in your terminal. It downloads rustup and sets up the stable toolchain for your user account.
# Linux or macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Download and run rustup-init.exe, or install it with the Windows Package Manager.
# PowerShell / winget
winget install Rustlang.Rustup
# Or download the installer:
# https://win.rustup.rs/x86_64
Prefer a package manager or a container? Use your distro's package or the official Rust image.
# Docker
docker run --rm -it rust
# Homebrew (macOS/Linux)
brew install rustup-init
Open a new terminal and ask the compiler and package manager for their versions. If you see version numbers, the install succeeded.
$ rustc --version
$ cargo --version
The exact version may differ, but the format should look like this:
rustc 1.98.1 (f1f5f6098 2026-01-15)
cargo 1.98.1 (f2f5f6098 2026-01-15)
Want to write your first program now? Head to Learn Rust.
Because rustup manages the toolchain for you, keeping Rust current takes a single command. Run it whenever you want the latest stable release.
# Update to the latest stable release
rustup update
# Remove the Rust toolchain and rustup
rustup self uninstall
You can also install additional toolchains, such as nightly or a pinned version, with rustup toolchain install and switch between them using rustup default.
With Rust installed, explore the toolchain or start learning the language.
Read The Rust Programming Language, work through Rustlings, and write your first program.
Discover Cargo, rustfmt, Clippy, and rustdoc, and see how they fit into your workflow.
Ask on the users forum, chat with the community, or search the documentation. Thousands of Rustaceans are happy to help.