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.
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.
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:
You should see output similar to this:
If you also want to see the package version installed by your distribution, use the appropriate command below.
On Ubuntu and Debian:
On RHEL, Rocky Linux, AlmaLinux, and Fedora:
These commands display the installed coreutils package version, which can be useful when comparing systems or troubleshooting differences between distributions.
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:
Once the installation is complete, load Rust into your current terminal session:
Now verify that Cargo, Rust’s package manager, is installed correctly:
You should see output similar to:
Next, install the build tools required to compile Rust packages.
On Ubuntu and Debian:
On RHEL, Rocky Linux, AlmaLinux, and Fedora:
These packages provide the compiler and development libraries needed to build Rust projects successfully.
Now that Rust and the required build tools are installed, you can install uutils-coreutils using Cargo.
When the installation completes successfully, you’ll see output similar to:
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:
After reloading your shell, the coreutils command will be available from the command line.
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:
You should see output similar to:
You can test other commands in the same way.
To see all the commands included in uutils-coreutils, run:
This displays the complete list of supported utilities, making it easy to check whether a particular command is available before using it.
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:
Here’s what these commands do:
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.
To start a temporary shell that uses the uutils commands first, run:
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:
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:
Next, measure the performance of the GNU wc command:
Example output:
Now run the same test using the uutils version:
Example output:
In this example, the uutils version completes the line count faster than the GNU version.
Since you installed uutils-coreutils with Cargo, updating it is straightforward.
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.
Updating Rust ensures you’re using the latest compiler and tools, which can include performance improvements and bug fixes.
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.
How to Downgrade and Lock Packages With dnf in RHEL Systems
5 Ways to Check Remote Port Connectivity in Linux
How to Resize ext4 Partitions and Filesystems in Linux
at Command: Schedule One-Time Linux Tasks Without Cron
20 Must-Know Linux Commands for System Administrators
How to Stop Linux Processes from Using Excessive CPU and RAM
SARG – Squid Analysis Report Generator and Internet Bandwidth Monitoring Tool
Guider – A System Wide Linux Performance Analyzer
Load Testing Web Servers with Siege Benchmarking Tool
Tuned – Automatic Performance Tuning of CentOS/RHEL Servers
rtop – An Interactive Tool to Monitor Remote Linux Server Over SSH
How to Install ‘atop’ to Monitor Real-Time System Performance
How to Find Command Location and Description in Linux
How to Find All Clients Connected to HTTP or HTTPS Ports
How to Save Command Output to a File in Linux
How to Safely Eject a USB Drive in Linux
10 SCP Commands to Transfer Files/Folders in Linux
Linux zcat Command Examples for Newbies
Top 5 Open-Source Productivity Tools for Linux
3 Essential Linux Disk Scanning Tools (GUI and Terminal Based)
11 Best GitHub Alternatives to Host Open Source Projects
7 Best Calendar Apps for Linux Desktop in 2024
11 Best Free and Low-Cost SSL Certificate Authorities
16 Best Tools to Access Remote Linux Desktop
—
**📚 Original Source:**
[Try uutils-coreutils: Rust Alternative to GNU Coreutils](https://www.tecmint.com/install-uutils-coreutils-linux/)
