Install Cargo On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And Raspbian
Install cargo
-
Debian
apt-get install cargoClick to copy -
Ubuntu
apt-get install cargoClick to copy -
Alpine OS
apk add cargoClick to copy -
Arch Linux
pacman -S cargoClick to copy -
Kali Linux
apt-get install cargoClick to copy -
Fedora
dnf install cargoClick to copy -
Raspbian
apt-get install cargoClick to copy
Rust package manager. Manage Rust projects and their module dependencies (crates).
How to use cargo?
Below are few example commands for cargo that you can use in the terminal.
Search for crates:cargo search search_stringClick to copyInstall a crate:cargo install crate_nameClick to copyList installed crates:cargo install --listClick to copyCreate a new binary or library Rust project in the current directory:cargo init --bin|libClick to copyCreate a new binary or library Rust project in the specified directory:cargo new path/to/directory --bin|libClick to copyBuild the Rust project in the current directory:cargo buildClick to copyBuild with multiple parallel jobs:cargo build -j jobsClick to copy
To install the latest version of cargo in your favorite operating system just copy the cargo installation command from above and paste it into terminal. It will download and install the latest version of cargo 2026 package in your OS.




