commands.sh

rustup

all

Install, manage, and update Rust toolchains. Some subcommands, such as `toolchain`, `target`, `update`, etc. have their own usage documentation.

More info →

Subcommands (18)

rustup check

Check for updates to Rust toolchains and `rustup`.

rustup completions

Generate shell completions for `rustup` and `cargo`.

rustup component

Modify a toolchain's installed components. Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains.

rustup default

Set the default Rust toolchain.

rustup doc

Open the offline Rust documentation for the current toolchain. There are a lot more documentation pages not mentioned here. See `rustup help doc` for more information.

rustup help

Display help on `rustup` and its subcommands.

rustup install

This command is an alias of `rustup toolchain install`.

rustup man

View the man page for a command managed by `rustup`.

rustup override

Modify directory toolchain overrides. See `rustup help toolchain` for more information about toolchains.

rustup run

Run a command with an environment configured for a Rust toolchain. Note: All commands managed by `rustup` have a shorthand for this: for example, `cargo +nightly build` is equivalent to `rustup run nightly cargo build`.

rustup self

Modify the `rustup` installation.

rustup set

Alter `rustup` settings.

rustup show

Show installed toolchains, targets, and the version of `rustc`.

rustup target

Modify a toolchain's supported targets. Without the `--toolchain` option `rustup` will use the default toolchain. See `rustup help toolchain` for more information about toolchains.

rustup toolchain

Manage Rust toolchains. See `rustup help toolchain` for more information about toolchains.

rustup uninstall

This command is an alias of `rustup toolchain uninstall`.

rustup update

Update Rust toolchains and `rustup` itself (if not installed using a package manager).

rustup which

Display which binary will be run for a command managed by `rustup`. Like `which`, but searches a Rust toolchain instead of `$PATH`.

Examples (7)

Install the nightly toolchain for your system

Switch the default toolchain to nightly so that the `cargo` and `rustc` commands will use it

Use the nightly toolchain when inside the current project but leave global settings unchanged

Update all toolchains

List installed toolchains

Run `cargo build` with a certain toolchain

Open the local Rust documentation in the default web browser

made by @shridhargupta | data from tldr-pages