LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

rustup-init.sh

Bootstrap installer script for rustup

TLDR

Install rustup
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
copy
Install without prompts
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
copy
Install nightly toolchain
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly
copy
Install minimal profile without modifying PATH
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --no-modify-path
copy
Install with additional target for cross-compilation
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --target wasm32-unknown-unknown
copy
Install with additional components
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --component rustfmt clippy
copy

SYNOPSIS

rustup-init.sh [options]

DESCRIPTION

rustup-init.sh is the Rust toolchain installer script. Downloads and runs rustup-init to install rustup and the Rust toolchain. This is the official method for installing Rust on Unix systems.Options can also be set via environment variables prefixed with RUSTUPINIT (e.g., RUSTUPINITDEFAULT_TOOLCHAIN=nightly).

PARAMETERS

-y

Accept defaults without prompting.
-q, --quiet
Disable progress output.
-v, --verbose
Enable verbose output.
--default-toolchain name
Install specific toolchain (stable, beta, nightly, or a version like 1.78.0).
--default-host triple
Set the default host triple (e.g., x86_64-unknown-linux-gnu).
--no-modify-path
Don't modify the PATH environment variable.
--profile name
Installation profile: minimal (rustc, cargo), default (adds rustfmt, clippy), or complete (all components).
--component name
Add a specific component (e.g., rust-docs, rustfmt, clippy). Can be specified multiple times.
--target triple
Add a cross-compilation target (e.g., wasm32-unknown-unknown). Can be specified multiple times.

SEE ALSO

rustup(1), cargo(1), rustc(1)

Copied to clipboard
Kai