How To Install Rustc On Debian, Ubuntu, Alpine, Arch, Kali, Fedora, Raspbian And MacOS?
Maintainer: Debian Rust Maintainers
Email: [email protected] .
Website: https://www.rust-lang.org/
Section: rust
Install rustc
-
Debian
apt-get install rustcClick to copy -
Ubuntu
apt-get install rustcClick to copy -
Alpine OS
apk add rustClick to copy -
Arch Linux
pacman -S rustClick to copy -
Kali Linux
apt-get install rustcClick to copy -
Fedora
dnf install rustClick to copy -
Raspbian
apt-get install rustcClick to copy -
macOS
brew install rustClick to copy
The Rust compiler. Processes, compiles and links Rust language source files.
How to use rustc?
Below are few example commands for rustc that you can use in the terminal.
Compile a single file:rustc file.rsClick to copyCompile with high optimization:rustc -O file.rsClick to copyCompile with debugging information:rustc -g file.rsClick to copy
To install the latest version of rustc in your favorite operating system just copy the rustc installation command from above and paste it into terminal. It will download and install the latest version of rustc 2026 package in your OS.




