ls, cp, mv, cat, sort, and wc that come with almost every Linux system. They just work, so I always assumed there wasn’t much to improve.That changed a few months ago when I was analyzing a huge Apache log file on one of my TecMint servers. I was running sort and wc on several gigabytes of data, and some commands took longer than I expected. That made me wonder if there was a faster or more modern alternative.
While looking around, I came across uutils-coreutils, an open-source project that reimplements GNU coreutils in Rust. It provides nearly all of the familiar commands you already use every day, but they’re written in Rust instead of C. Besides Rust’s built-in memory safety, some commands can also perform better when working with large files.
Instead of replacing the system’s default coreutils, I installed uutils alongside the existing GNU tools and compared them side by side. For example, I tested wc -l on a 6GB log file using both versions. On my system, the uutils version completed noticeably faster, which was enough to convince me that it was worth exploring further.
In this article, you’ll learn how to install uutils-coreutils safely without replacing your system’s default tools, try its commands alongside GNU coreutils, and run a few simple benchmarks to compare their performance. That way, you can decide whether it’s a good addition to your own Linux tasks.
What Is coreutils (and Why Is There a Rust Version?)
GNU coreutils is a collection of the basic command-line tools that every Linux system relies on. Commands like ls, cp, mv, rm, cat, mkdir, echo, and wc all come from this package.
GNU coreutils has been around since the early 1990s and has proven to be reliable over the years. It’s one of the most important software packages on any Linux system.
So why create a Rust version?
The original GNU coreutils is written in C, a language that gives developers a lot of control but also requires careful memory management. Bugs such as buffer overflows and use-after-free errors can occur if memory isn’t handled correctly, even in well-tested software.
uutils-coreutils is an open-source project that reimplements the entire GNU coreutils suite in Rust and it is designed with built-in memory safety, preventing many of these types of bugs during compilation. The goal is to provide the same commands, options, and behavior you’re already familiar with, but using a safer foundation.
Another advantage is that uutils-coreutils runs natively on Linux, macOS, and Windows, making it easier to use the same command-line tools across different operating systems.
For Linux users, the main benefits are improved memory safety and, in some cases, better performance when working with large files.
Step 1: Check Your Current GNU coreutils Version
Before installing uutils-coreutils, it’s aOn RHEL, Rocky Linux, AlmaLinux, and Fedora: good idea to check which version of GNU coreutils is already installed on your system, which gives you a reference point for later comparisons.
Run the following command:
ls --version
You should see output similar to this:
ls (GNU coreutils) 9.4 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Richard M. Stallman and David MacKenzie.
If you also want to see the package version installed by your distribution, use the appropriate command below.
On Ubuntu and Debian:
apt list --installed 2>/dev/null | grep coreutils
On RHEL, Rocky Linux, AlmaLinux, and Fedora:
rpm -q coreutils
These commands display the installed coreutils package version, which can be useful when comparing systems or troubleshooting differences between distributions.
coreutils/noble-updates,now 9.4-3ubuntu6.2 amd64 [installed]
Step 2: Install Rust and Cargo
Since uutils-coreutils is written in Rust, you’ll need the Rust toolchain before you can install it. The recommended way is to use the official rustup installer, which works on all major Linux distributions.
Run the following command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Once the installation is complete, load Rust into your current terminal session:
source "$HOME/.cargo/env"
Now verify that Cargo, Rust’s package manager, is installed correctly:
cargo --version
You should see output similar to:
cargo 1.79.0 (ffa9cf99a 2024-06-03)
Next, install the build tools required to compile Rust packages.
On Ubuntu and Debian:
sudo apt update sudo apt install -y build-essential pkg-config libssl-dev
On RHEL, Rocky Linux, AlmaLinux, and Fedora:
sudo dnf groupinstall -y "Development Tools" sudo dnf install -y openssl-devel
These packages provide the compiler and development libraries needed to build Rust projects successfully.
Step 3: Install uutils-coreutils
Now that Rust and the required build tools are installed, you can install uutils-coreutils using Cargo.
cargo install coreutils
When the installation completes successfully, you’ll see output similar to:
Building [=======================> ] 412/413: coreutils(bin) Finished `release` profile [optimized] target(s) in 2m 22s Installing /home/ravi/.cargo/bin/coreutils Installed package `coreutils v0.9.0` (executable `coreutils`)
Unlike GNU coreutils, which installs each command as a separate executable, uutils-coreutils installs a single multi-call binary named coreutils.
To make the binary available from any terminal, add Cargo’s binary directory to your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
After reloading your shell, the coreutils command will be available from the command line.
Step 4: Test Individual uutils Commands
The coreutils binary can run any of the commands it provides. To use a specific command, pass its name as the first argument.
For example, to run the uutils version of ls, use:
~/.cargo/bin/coreutils ls -la
You should see output similar to:
total 32 drwxr-xr-x 5 ravi ravi 4096 Jul 8 10:14 . drwxr-xr-x 18 ravi ravi 4096 Jul 8 09:02 .. -rw-r--r-- 1 ravi ravi 220 Jul 8 09:02 .bash_logout -rw-r--r-- 1 ravi ravi 3771 Jul 8 09:02 .bashrc drwxr-xr-x 8 ravi ravi 4096 Jul 8 10:11 .cargo
You can test other commands in the same way.
~/.cargo/bin/coreutils wc -l /var/log/syslog ~/.cargo/bin/coreutils cat /etc/os-release ~/.cargo/bin/coreutils sort /tmp/mylist.txt
To see all the commands included in uutils-coreutils, run:
~/.cargo/bin/coreutils --list
This displays the complete list of supported utilities, making it easy to check whether a particular command is available before using it.
Step 5: Create Symlinks for Easier Testing
Running coreutils ls or coreutils wc every time can become inconvenient. A better approach is to create symlinks for each command in a separate directory and use them only when you’re testing uutils-coreutils.
First, create a directory for the symlinks and generate them automatically:
mkdir -p ~/uutils-bin
for cmd in $(~/.cargo/bin/coreutils --list); do
ln -sf ~/.cargo/bin/coreutils ~/uutils-bin/$cmd
done
Here’s what these commands do:
mkdir -p ~/uutils-bincreates a directory to store the symlinks. If it already exists, nothing happens.coreutils --listprints the names of all supported commands.- The
forloop creates a symbolic link for each command, with every link pointing to the samecoreutilsbinary.
The coreutils binary checks the name it was started with and automatically behaves as that command. For example, if you run the wc symlink, it acts just like the wc command.
~/uutils-bin before /usr/bin in your PATH. Doing so would replace the default GNU commands for all terminal sessions and scripts, which could lead to unexpected behavior. Use it only when you’re testing.To start a temporary shell that uses the uutils commands first, run:
PATH="$HOME/uutils-bin:$PATH" bash
Inside this new shell, commands such as ls, cat, wc, and sort will use the uutils-coreutils versions instead of the GNU versions.
When you’re finished testing, simply exit the shell:
exit
Step 6: Compare uutils-coreutils with GNU coreutils
The best way to see whether uutils-coreutils is faster on your system is to compare it with the standard GNU version using the same file.
First, create a large test file:
seq 1 20000000 > /tmp/bignum.txt
Next, measure the performance of the GNU wc command:
time wc -l /tmp/bignum.txt
Example output:
20000000 /tmp/bignum.txt real 0m0.412s user 0m0.380s sys 0m0.031s
Now run the same test using the uutils version:
time ~/.cargo/bin/coreutils wc -l /tmp/bignum.txt
Example output:
20000000 /tmp/bignum.txt real 0m0.298s user 0m0.271s sys 0m0.026s
In this example, the uutils version completes the line count faster than the GNU version.
Keeping uutils-coreutils Up to Date
Since you installed uutils-coreutils with Cargo, updating it is straightforward.
cargo install coreutils --force
The --force option tells Cargo to replace the existing installation with the latest available version.
It’s also a good idea to keep your Rust toolchain up to date.
rustup update
Updating Rust ensures you’re using the latest compiler and tools, which can include performance improvements and bug fixes.
Concusion
uutils-coreutils offers a modern Rust implementation of the familiar GNU coreutils commands, with a strong focus on memory safety and, in some cases, improved performance. While it isn’t yet a complete replacement for GNU coreutils, it’s easy to install alongside your existing tools and evaluate without affecting your system.
If you’re curious about Rust-based system utilities or want to see how they perform on your own workloads, uutils-coreutils is well worth trying. Test it with the commands you use most often and decide whether it fits into your Linux workflow.





