1. Introduction: installing Rust CLI tools shouldn’t feel like a boss fight
If you’ve ever tried installing a Rust CLI tool and ended up bouncing between GitHub issues, conflicting tutorials, or strange binary names, you’re not alone.
This article was inspired by genuine developer feedback. One reader, Allister, put it best:
“Would be helpful to know how to install these? Seem to be all over the place?”
And he’s right. Some tools are in Homebrew, others are on apt
, a few require snap
, and many are best installed through cargo install
. Even then, you might run into differences in package names between Linux and macOS, or wonder why a tool is installed but not on your PATH
.
The goal here is simple: give you one place to figure it all out. No guesswork, no outdated info, and no endless web searches.
This is the definitive, cross-platform guide to installing the most popular Rust CLI tools clearly laid out with command-by-command instructions for macOS, Linux, and cargo
. Whether you're building a fresh dev environment or just want to try something like ripgrep
, fd
, or eza
, this guide has you covered.
By the end, you’ll have a working toolset, know which install method is best for each use case, and even learn how to automate the setup in your dotfiles or install scripts.
Promo code: devlink50
Let’s make installing Rust tools as smooth as using them.
2. Setting up Rust (if you haven’t already)
Before you dive into installing all the cool Rust CLI tools, there’s one thing you need to make sure of: Rust itself is properly installed on your system.
If you’re already using Rust and cargo
, feel free to skim this section but if you’re new or unsure, this step is absolutely essential.
2.1 Installing Rust the right way
The official and most reliable way to install Rust is via rustup
, the Rust toolchain installer. It handles installation, updates, and lets you manage multiple Rust versions if needed.
To install it, run this in your terminal:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
This works on macOS, Linux, and WSL. The script will walk you through the install process just accept the defaults unless you have specific needs.
Once installed, make sure your shell is configured correctly. You may need to restart your terminal or run:
source $HOME/.cargo/env
To confirm everything’s working, try:
rustc --version
cargo --version
If both commands return a version number, you’re all set.
2.2 What is cargo install
and why does it matter?
Once Rust is installed, you’ll use its package manager, cargo
, to install many CLI tools.
Think of cargo install
as Rust’s version of pip install
or npm install -g
but instead of just copying a binary, it compiles the source code directly on your machine.
For example:
cargo install ripgrep
This command:
- Downloads the tool’s source code from crates.io
- Compiles it locally
- Places the resulting binary in
~/.cargo/bin
Make sure this path is in your PATH
environment variable:
export PATH="$HOME/.cargo/bin:$PATH"
Add that line to your .bashrc
, .zshrc
, or .profile
file to make it permanent.
Quick heads-up:
-
cargo install
builds from source it can take longer, especially for large projects. - It installs tools per user, not system-wide.
- Some system tools (like
fd
) have different names when installed via package managers more on that in the next section.
With Rust installed and cargo
ready to go, you now have everything needed to install your CLI tools. Let’s break them down one by one.
3. Tool-by-tool install breakdown
Now that Rust is set up, it’s time to install the tools that make your command-line environment a joy to use. Below is a breakdown of the most popular Rust-based CLI tools, showing how to install them on macOS (with brew
), Ubuntu (with apt
or snap
), and using cargo install
.
Each tool includes notes to help you avoid naming conflicts, outdated packages, or hidden pitfalls. ✅ = supported, ❌ = not available via that method.

3.1 Real-world usage notes
-
ripgrep: Lightning-fast alternative to
grep
. Use it once and you won’t go back. -
fd: Modern
find
. On Ubuntu, you may need to run it asfdfind
unless you add an alias.
alias fd=fdfind
-
bat: Replaces
cat
and adds syntax highlighting, line numbers, and git integration. - just: A task runner that feels like Makefiles without the mess. Ideal for dev scripts.
-
hyperfine: Want to know how fast a command is?
hyperfine 'your_command'
gives you microbenchmarking out of the box. -
eza: New and shiny file lister replacing
ls
, written in Rust and actively maintained.
3.2 Choosing your install method (preview)
Don’t worry if you’re unsure whether to use cargo
, brew
, or apt
we’ll cover that in the next section. The good news: you have options, and it’s okay to mix them based on what works best for your OS and workflow.

4. Choosing the best install method
You’ve seen the tools and how they can be installed. Now comes the real-world question: which installation method should you actually use?
Not all install methods are created equal. Some prioritize convenience, others offer the latest features, and a few are simply there as a fallback when the others don’t work.
Here’s how to pick the right one based on your priorities.
4.1 brew, apt, and snap: fast and familiar
If you’re used to managing software with system package managers like brew
(macOS) or apt/snap
(Ubuntu), this path is:
- 🟢 Fast prebuilt binaries install in seconds
- 🟢 Integrated uninstall or upgrade is easy (
brew upgrade
,apt upgrade
) - 🔴 Sometimes outdated repos don’t always carry the latest versions
Use this method if:
You prefer system-wide installs, stability over freshness, and want tools managed the same way as the rest of your software.
4.2 cargo install: flexible and up-to-date
Rust’s native method to install tools compiles from source and gives you the latest release from crates.io.
- 🟢 Always latest version
- 🟢 Doesn’t require root/sudo
- 🟢 Great for devs and scripting
- 🔴 Slower install (compilation takes time)
- 🔴 User-local (not global), so may need PATH setup
Use this method if:
You want bleeding-edge updates, are comfortable with Rust, or you’re installing tools that aren’t available via your OS package manager.
Example:
cargo install eza
If you later want to update everything:
cargo install-update -a # after installing cargo-update
4.3 GitHub releases: manual but powerful
Most Rust CLI tools also offer precompiled binaries on their GitHub releases page. This can be helpful if:
- The tool is not available via other methods
- You’re working in an air-gapped environment
- You want to skip compilation but not use a system package manager
Typical process:
- Go to the repo’s Releases page
- Download the binary matching your OS/arch
- Make it executable:
chmod +x your-tool
- Move it to your binary path:
mv your-tool ~/.cargo/bin/ # or /usr/local/bin
Use this method if:
You’re doing a custom setup, using Docker images, or need full control over the version.
4.4 Troubleshooting common install issues
Let’s decode a few of the common frustrations developers face:
-
Tool installs but isn’t found? Likely a
PATH
issue. Add this to your shell config:
export PATH="$HOME/.cargo/bin:$PATH"
- Install fails with cryptic errors? Make sure you’ve installed the Rust build tools:
sudo apt install build-essential
-
Permissions issue? Avoid installing with
sudo cargo install
. Use user-local installs instead. -
Binary name is different on Linux? For example,
fd
is installed asfdfind
create an alias:
alias fd=fdfind
There’s no single best method it depends on your environment, your workflow, and how often you update tools. That said, if you automate things (which we’ll do next), you can use any method you want and never think about it again.
5. Automating your CLI tool setup
You’ve picked your tools, chosen how to install them, and maybe even adjusted your PATH
. Great but if you’re rebuilding a dev environment, setting up a new machine, or just don’t want to repeat the same manual steps again… it’s time to automate your setup.
Let’s talk about how to make that happen like a seasoned developer.
5.1 Use a shell script or task runner
You can automate your entire CLI tool install process with a simple shell script. Here’s an example using cargo
:
#!/bin/bash
echo "Installing Rust CLI tools..."
# Add any tools you want below
cargo install ripgrep fd-find bat eza just dust hyperfine procs zellij bottom
echo "✅ All tools installed!"
Save this as install-tools.sh
, give it permission:
chmod +x install-tools.sh
And run it whenever you need to bootstrap your CLI environment:
./install-tools.sh
Want to get fancy? Use just
a modern alternative to Makefiles — and write your own justfile
:
install-tools:
cargo install ripgrep fd-find bat eza just
Then run:
just install-tools
It’s cleaner, readable, and reusable.
5.2 Keep tools updated automatically
If you installed tools via cargo
, you’ll want a way to keep them fresh. Enter cargo-update
.
Install it once:
cargo install cargo-update
Then, update all your installed cargo tools with:
cargo install-update -a
This command checks all installed binaries from crates.io and updates them to the latest version. Run it occasionally, or add it to a cron job or shell alias like:
alias cargo-up="cargo install-update -a"
5.3 Dotfiles for full automation
If you’re already managing your environment with a dotfiles
repo (and you should be), consider including:
- Your
install-tools.sh
script - Your shell config with
PATH
updates - Your
justfile
or Makefile - Optional aliases (e.g.,
alias fd=fdfind
)
Then, with a single git clone
+ source setup.sh
, your environment is good to go.
This is the ultimate way to keep your CLI stack consistent across laptops, dev machines, or cloud shells.
6. Final thoughts: tools are only useful if you can actually run them
Rust-based CLI tools are fast, beautiful, and often more powerful than their Unix-era counterparts but none of that matters if they’re a hassle to install.
Hopefully, this guide helped you answer the most important questions:
- Which tools are worth using?
-
How do I install them cleanly on macOS, Linux, or with
cargo
? - What are the trade-offs between package managers and building from source?
- How can I automate all of it so I never have to think about it again?
By choosing the right method for your OS and workflow and setting up a script or dotfiles repo you save hours in the long run. Plus, next time someone asks “how do I install bat
?" or "why isn’t fd
working?" you’ll have real answers, not guesswork.
And if you’re the type who enjoys performance, clean terminals, and slick tools installing them the right way is half the experience.
Essential links
- Install Rust (rustup.rs) Official Rust installer
- cargo install docs How to install CLI tools with Cargo
- cargo-update crate Keep all your installed Cargo tools up-to-date
- ripgrep GitHub Fast alternative to grep
-
eza GitHub Modern replacement for
ls
- just GitHub A simple and powerful task runner

Top comments (0)