We’ve all been there once. Imagine going through the trouble of finding an app, only for it to turn out to be incompatible with your OS. Linux distributions can be terribly varied, and packages aren’t always compatible across distros.
Using a virtual machine would seem like the logical choice then, but setting it up is a hassle. Enter Distrobox, a tool that lets users run almost any Linux distribution within a containerized environment.
It’s been quite a handy tool, especially when attempting to get .deb and .rpm format files to work.
These free Linux apps made leaving Windows easier than I expected
I thought I’d lose my workflow. Instead, I upgraded it.
How does it work?
Container magic
In a nutshell, Distrobox is a kit of software that lets users run apps from different distributions within a containerized environment. Apps within the container maintain tight integration with the host system, with access to its directories.
Interestingly enough, Distrobox does not actually manage containers by itself — you’ll need either Podman or Docker to achieve that in conjunction.
Of course, the tight integration between the container and host makes it impossible to completely isolate the Distrobox-ed program, but there is some level of separation.
Still, it’s a remarkable piece of software that remains updated to this day. There appears to be a negligible performance penalty when running apps in Distrobox, which makes it even more appealing.
Getting it up and running
Distrobox support exists for major distros
On Arch Linux, Distrobox was surprisingly easy to configure and install. I started by installing both Distrobox and Podman packages using the AUR, and went on to download an RPM file.
sudo pacman -S distrobox
sudo pacman -S podman
RPM files are Fedora-specific, so I had to create a container for Fedora programs. This bit was also surprisingly easy to set up, though I had to wait a while for the whole process to complete (including downloading a Fedora image). Make sure to hit Y/Enter to confirm the download.
distrobox create --name fedora --image fedora:latest
With the Fedora container up and ready, we can finally enter the virtual environment and cd into our Downloads folder, which houses the specific RPM file we need. The initial setup took some time, so I had to wait a while.
distrobox enter fedora
Once in the Downloads folder, all I had to do was run “sudo dnf install” followed by the RPM file name to get it to launch. Sudo isn’t required here since Distrobox gives users password less sudo access within the container. A few minutes later, I had a Fedora app up and running on my Arch Linux system.
cd Downloads
sudo dnf install ./your-app-name-here.rpm
This will pull in a number of dependencies. Make sure you have enough free space!
Quirks and annoyances
I’d still take a native package over this any day of the week
Distrobox, despite being dead simple to use, runs entirely on a command-line interface. This makes it far less approachable than something with a GUI.
Enter BoxBuddy, a friendly program that aims to make launching and managing Distrobox containers much easier. Once installed (from either a native build or a Flatpak), I was presented with a menu that houses basic and advanced functions, such as restarting the container or deleting it outright.
In a way, BoxBuddy feels like the missing link that helps manage Distrobox a lot better.
Unfortunately, nothing ever trumps native packages. Having to jump through multiple hoops to get stuff working is less than ideal, and Distrobox containers do take up a lot more space than you’d expect.
If you have a native app available, consider going for that first before switching to Distrobox.
Still worth a look
Distrobox might not be a perfect solution, but it does come really close. It’s far better than having to run a dedicated virtual machine for programs (and managing their file access, which is a massive headache in itself), and is performant enough that you are unlikely to notice the difference.
Of course, your mileage will most certainly vary, depending on the app you’re trying to run, but I’d say that Distrobox is worth the hype. It lets me freely experiment with different Linux distribution packages without fear of breaking my system, and earns a very solid recommendation.
