Linux command
rustup-install 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Install
rustup install stable
Install
rustup install nightly
Install a pinned version
rustup install 1.78.0
Install a nightly from a specific date
rustup install nightly-2025-01-15
Install with the minimal profile
rustup install stable --profile minimal
Install and add components
rustup install nightly --component rust-src --component rust-analyzer
Install without checking for self-update
rustup install stable --no-self-update
说明
rustup install downloads and installs one or more Rust toolchains. It is an alias for rustup toolchain install. A toolchain is identified by a channel (stable, beta, nightly), an exact version (1.78.0), and optionally a date (nightly-2025-01-15) and host triple (stable-x86_64-unknown-linux-gnu). If the toolchain is already installed it is updated to the latest release on that channel.
参数
- --profile _NAME_
- Installation profile: minimal, default, or complete. Controls which components are installed.
- -c, --component _NAME_
- Add a component to the toolchain (for example `rust-src`, `rust-analyzer`, `llvm-tools`, `miri`). May be repeated.
- -t, --target _TRIPLE_
- Add a cross-compilation target. May be repeated.
- --no-self-update
- Do not update rustup itself while installing the toolchain.
- --force
- Reinstall the toolchain even if it appears up to date; on nightly, install even if some requested components are missing.
- --force-non-host
- Allow installing a toolchain whose host triple does not match the running machine (introduced in rustup 1.28).
- --allow-downgrade
- Allow choosing an older nightly if the most recent one is missing required components.
- -h, --help
- Print help.
FAQ
What is the rustup-install command used for?
rustup install downloads and installs one or more Rust toolchains. It is an alias for rustup toolchain install. A toolchain is identified by a channel (stable, beta, nightly), an exact version (1.78.0), and optionally a date (nightly-2025-01-15) and host triple (stable-x86_64-unknown-linux-gnu). If the toolchain is already installed it is updated to the latest release on that channel.
How do I run a basic rustup-install example?
Run `rustup install stable` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --profile _NAME_ do in rustup-install?
Installation profile: minimal, default, or complete. Controls which components are installed.