Home UbuntuOxidizr: Try Modern Rust Alternatives To Legacy Unix Tools In Ubuntu

Oxidizr: Try Modern Rust Alternatives To Legacy Unix Tools In Ubuntu

Modernize Ubuntu Tools with Oxidizr and Rust.

By sk
1.2K views 8 mins read

Looking to try modern Rust-based replacements for classic Unix tools on your Ubuntu system? Say hello to oxidizr, a lightweight command-line utility designed to help you experiment with safer, memory-safe Rust alternatives to traditional Unix utilities.

Many core Unix tools in Ubuntu are written in C, a language known for its speed but also for its potential security risks.

That’s why Ubuntu is gradually replacing some of these tools with versions written in Rust, a programming language built from the ground up for safety and reliability.

Oxidizr makes this transition easy. It lets you toggle between legacy tools and their Rust-based counterparts without making permanent changes to your system.

Introduction

Ubuntu is a popular Linux operating system used by millions around the world, from everyday computers to large servers.

The tools that make up its core, like the sudo command you use to run things as an administrator, are incredibly important for keeping everything safe and running smoothly.

But even the most trusted tools can sometimes have weaknesses. Many of these core tools were written a long time ago in C programming language.

While C is powerful, it can sometimes allow certain types of errors that can be exploited by malicious actors to gain access or disrupt systems.

This is where Rust comes in. Rust is a more modern programming language known for its strong focus on safety, especially when it comes to handling computer memory.

By design, Rust helps prevent many of the common mistakes that can lead to security problems in C code.

Ubuntu is now taking steps to replace some of its foundational tools with newer versions written in Rust.

This effort is part of a plan called "Carefully But Purposefully Oxidising Ubuntu". The goal is to make Ubuntu even more resilient and trustworthy.

Meet Oxidizr: Test Rust-Based Tools on Ubuntu

To help developers and curious users explore these new Rust-based tools, a special utility called oxidizr has been created.

What is oxidizr?

Simply put, oxidizr is a command-line tool for Ubuntu systems. It lets you experimentally swap out some traditional Unix tools with their modern Rust-based replacements.

Think of it like having two versions of a tool available, and oxidizr helps you switch between them to see how the new one works.

This is useful for testing and seeing how ready these new tools are for everyday use.

Which Rust-based Tools Can oxidizr Replace?

As of version 1.0.0, oxidizr supports swapping out the following sets of tools with Rust versions from the uutils and sudo-rs projects:

  • uutils coreutils: This replaces many of the basic commands you use constantly, like ls (list files) or cp (copy files). coreutils and sudo-rs are the most complete experiments and are enabled by default in oxidizr.
  • uutils findutils: Tools for finding files.
  • uutils diffutils: Tools for comparing files and text.
  • sudo-rs: A new implementation of the critical sudo command.

These projects are being developed by the Trifecta Tech Foundation (TTF), a non-profit focused on building secure, open-source infrastructure.

TTF also develop other important projects related to network time, data compression, and smart grids.

Why Use Rust for Tools like sudo and coreutils?

The main reason for rewriting tools like sudo in Rust is enhanced safety and security.

The original sudo tool, while very important, has been the target of many security issues over the years due to memory-related vulnerabilities.

Rust's design provides strong guarantees against these kinds of memory safety issues.

By using Rust for tools that handle important tasks like allowing users to run commands as the administrator (sudo), Ubuntu aims to make the system's security more robust.

For most people, using sudo-rs instead of the original sudo should feel exactly the same in day-to-day use. It's designed to be a near drop-in replacement.

However, the developers are taking a "less is more" approach, meaning some less common or outdated features of the original sudo might not be included.

For example, distributing the sudoers file using something called LDAP is not planned for sudo-rs.

Ubuntu plans to make sudo-rs the default sudo in the upcoming Ubuntu 25.10 release.

This release is being used as a testing ground to gather feedback before possibly including sudo-rs by default in the next long-term support release, Ubuntu 26.04 LTS.

For more details, please refer our article in the link below:

How to Try Rust Alternatives to Unix Tools with Oxidizr

If you are an advanced user or developer and want to test these new tools, oxidizr is available.

BUT, and this is very important: oxidizr is an experimental tool! Using it MAY cause problems with your system, including losing data or preventing your computer from starting up.

It is strongly recommended to use oxidizr only on a test machine or a virtual machine.

If you understand the risks and want to proceed, you can install oxidizr by downloading its binary releases from GitHub or using the cargo tool if you have Rust installed. It works on Ubuntu versions after 24.04 LTS.

Install oxidizr in Ubuntu

The oxidizr tool itself should work on all versions of Ubuntu after 24.04 LTS. But, the availability of the experiments might vary; for example, the diffutils experiment is only available from Ubuntu 24.10 onward.

You need root privileges to run oxidizr. There are a couple of ways to get oxidizr on your system:

Using cargo (if you have Rust's package manager installed):

cargo install --git https://github.com/jnsgruk/oxidizr

Downloading and installing binary releases from Github:

The another way to install oxidizr is using curl and tar to download the latest release binary for your architecture and move it to /usr/bin/oxidizr.

Get the latest release:

latest="$(curl -s "https://api.github.com/repos/jnsgruk/oxidizr/releases/latest" | jq -r '.name')"

Download and install to /usr/bin/oxidizr:

curl -sL "https://github.com/jnsgruk/oxidizr/releases/download/$latest/oxidizr_Linux_$(uname -m).tar.gz" | sudo tar -xvzf - -C /usr/bin oxidizr

Switch to Rust Tools on Ubuntu Using oxidizr

Once installed, you invoke oxidizr as root. It supports two main commands: enable and disable.

Supported Experiments:

As of version 1.0.0, oxidizr supports experiments for the following Rust-based replacements:

  • uutils coreutils
  • uutils findutils
  • uutils diffutils
  • sudo-rs

By default, the coreutils and sudo-rs experiments are enabled because they are considered the most complete and stable experiments.

Enabling Experiments:

To enable the default experiments (which are rust-coreutils and sudo-rs in v1.0.0), you can use:

sudo oxidizr enable

You will be given a warning before enabling the expriements. Type y and hit ENTER to continue.

? Continue? (y/N)  y
[⚠️ oxidizr can cause harm to your system! ⚠️
Depending on your configuration and workload, oxidizr's
experiments could cause your machine to fail to boot, or
your workloads to fail. Use with caution.]

This will install and enable rust-coreutils and sudo-rs.

2025-05-09T08:18:47.595755Z  INFO Updating apt package cache
2025-05-09T08:18:55.534721Z INFO Installing and configuring rust-coreutils
2025-05-09T08:19:01.599105Z INFO Installing and configuring sudo-rs
Install Rust Alternatives to Unix Tools with oxidizr in Ubuntu
Install Rust Alternatives to Unix Tools with oxidizr in Ubuntu

To enable specific experiments, you can use the --experiments flag:

sudo oxidizr enable --experiments coreutils findutils

To enable all known experiments (without prompting), you can use --all --yes:

sudo oxidizr enable --all --yes

Disabling Experiments:

Note: The process for disabling generally involves checking for and restoring backed-up original binaries and uninstalling the new package.

To disable the default experiments, you use:

sudo oxidizr disable

To disable all experiments (without prompting), you can use --all --yes:

sudo oxidizr disable --all --yes

Display help:

oxidizr --help

Experiment with Rust-based Unix Tools

Once you've enabled the experiments, use the commands such as cp, mv, ls and other commands provided by each package and see how they perform.

coreutils package includes most basic fundamental shell commands:

  • ls, cp, mv, rm, cat, touch, mkdir, rmdir, echo, pwd, whoami, df, du, head, tail, sort, uniq, cut, tr, tee, yes, basename, dirname, date, env, sleep, stat, test, true, false, timeout, uptime, etc.

diffutils includes tools for comparing files:

  • diff, cmp, sdiff, diff3

findutils includes tools for finding files and executing actions:

  • find, xargs

To see which commands or binaries are provided by a package like coreutils, diffutils, findutils, and sudo-rs, use one of the following commands:

dpkg -L coreutils | grep '/bin/'
dpkg -L diffutils | grep '/bin/'
dpkg -L findutils | grep '/bin/'
dpkg -L sudo-rs | grep '/bin/'

Conclusion

oxidizr is a tool that lets you get a glimpse into the future of Ubuntu. By helping test Rust-based replacements for essential tools like sudo and coreutils, it supports Ubuntu's mission to build a safer, more resilient operating system for everyone.

Remember, use oxidizr with caution on a test system, but know that the work behind it aims to make your Ubuntu experience more secure in the long run.

Resource:

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More