rustup-which

Show path to Rust toolchain binaries

TLDR

Find cargo path
$ rustup which cargo
Find rustc path
$ rustup which rustc
Find tool in specific toolchain
$ rustup which --toolchain nightly rustfmt

SYNOPSIS

rustup which [options] command

DESCRIPTION

rustup which displays the path to Rust tools. Shows which binary would be executed for a given command. Useful for debugging toolchain issues.

PARAMETERS

--toolchain name

Search in specific toolchain.

INSTALL

sudo apt install rustup
sudo dnf install rustup
sudo pacman -S rustup
sudo zypper install rustup
brew install rustup
nix profile install nixpkgs#rustup

SEE ALSO

rustup(1), which(1)