LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rustup-default

Set the default Rust toolchain

TLDR

Set default toolchain
$ rustup default stable
copy
Set nightly as default
$ rustup default nightly
copy
Set specific version
$ rustup default [1.70.0]
copy
Show current default
$ rustup default
copy

SYNOPSIS

rustup default [toolchain]

DESCRIPTION

rustup default sets or shows the default Rust toolchain. The default toolchain is used when no override is active (via `rustup override` or `rust-toolchain.toml`). Common choices are stable, beta, or nightly. If the specified toolchain is not installed, rustup will download and install it automatically.

PARAMETERS

toolchain

Toolchain name: stable, beta, nightly, or a specific version like 1.70.0. Can include a target triple (e.g., `nightly-x86_64-unknown-linux-gnu`).

CAVEATS

Project-level overrides (from `rust-toolchain.toml` or `rustup override`) take precedence over the default. Changing the default does not affect projects that have overrides set.

SEE ALSO

Copied to clipboard
Kai