|
|
Log in / Subscribe / Register

Mix and match Linux distributions with Distrobox

By Joe Brockmeier
December 10, 2025

Linux containers have made it reasonably easy to develop, distribute, and deploy server applications along with all the distribution dependencies that they need. For example, anyone can deploy and run a Debian-based PostgreSQL container on a Fedora Linux host. Distrobox is a project that is designed to bring the cross-distribution compatibility to the desktop and allow users to mix-and-match Linux distributions without fussing with dual-booting, virtual machines, or multiple computers. It is an ideal way to install additional software on image-based systems, such as Fedora's Atomic Desktops or Bazzite, and also provides a convenient way to move a development environment or favorite applications to a new system.

Distrobox creator Luca Di Maio was inspired by the Toolbx project (formerly Container Toolbox) for Fedora. Generally, the idea with Linux containers is to run processes in their own environment to isolate them as much as possible from the host without having to resort to virtual machines with their additional overhead. It is possible, though, to set up a container to give it privileged access to the system with little to no isolation. This is typically referred to as a privileged container. It is possible to set up privileged containers manually, but it requires the user to know a great deal about working with containers and some fairly involved setup. The original goal for Toolbx was to let users run a privileged container "toolbox" on image-based systems that could be used for system administration and troubleshooting without having to include administration utilities in the image itself.

Toolbx has a somewhat limited scope: it works best with specific container images and was primarily developed to provide a software toolbox for image-based Fedora editions like CoreOS and Silverblue. Toolbx is also limited to the Podman container manager, which is not ideal for those who prefer to use Docker. Di Maio wanted to have broader compatibility with other Linux distributions as host operating systems as well as the ability to use a wide range of container images. He published the first release, Distrobox 1.0.0, in December 2021, under the GPLv3.

The Distrobox project is, as its homepage notes, "a fancy wrapper" that works with Docker and Podman, with di Maio's own minimal container manager, Lilipod, as a fallback if the others are not present. Distrobox is written in POSIX shell, so that it is as portable as possible. The project's primary goal is to allow the use of any Linux distribution containers on any Linux distribution host running one of the supported container managers. It also has a goal of entering a container as quickly as possible, "every millisecond adds up if you use the container as your default environment for your terminal".

Di Maio notes in the project's README that isolation and sandboxing of applications are non-goals: "on the contrary it aims to tightly integrate the container with the host". This means that containers run by Distrobox have access to the user's home directory, external storage, USB devices, audio devices, and more. The idea of a sandboxed mode for Distrobox was discussed but di Maio ultimately decided against implementing one and has opted not to take patches attempting to add isolation features: "the focus of distrobox is not isolation, security or stuff, but integration and transparency with the host".

Getting started

Distrobox is packaged for most popular Linux distributions, and the project has a compatibility table of host distributions for those it has been tested on. The table has notes with additional instructions if necessary. There is a table of guest distributions as well that lists the container images that have been successfully tested with Distrobox. If a distribution is not mentioned in the host or guest table it does not mean that Distrobox will not work; it simply indicates that the combinations have not been tested. Users will also need one of the supported container managers installed as well.

Here is an example of how and why one might use Distrobox: the Signal project only provides packages for Debian-based distributions, so there are no official packages for Arch, Fedora, openSUSE, or other non-Debian systems. There is a Flatpak available, but it is not maintained by the Signal project itself. It is possible to compile Signal from source, but it is far easier to create a Debian Distrobox and install the official Signal package there:

    $ distrobox create -i debian:trixie -n signal -H ~/distrobox/signal
    $ distrobox enter signal

The first command tells distrobox to create a new container using the debian:trixie image with its home directory set to ~/distrobox/signal, and to name it "signal". If the debian:trixie container image is not already present on the system, Distrobox will ask if you want to download it. Note that Distrobox uses the system's settings for short-name container lookup; it is also possible to pass the full registry path to distrobox if one prefers. The second command tells it to open a shell inside the container (or enter the container) so one can work within its environment.

All of that will probably look quite familiar to folks who work with Linux containers regularly, but Distrobox is doing quite a bit more behind the scenes. The "--dry-run" (or just "-d") option will print out the command that "distrobox create" is passing to the container manager for inspection, without taking any actions. It's worth eyeballing the output to see what goes into setting up a container that's well-integrated with the host system. In the case of the example command here, there are more than 50 options passed to podman, including 17 volume mounts. That is a lot of container magic that the user is not required to fuss with or know about, unless they want to.

One of the things it does is to set up passwordless sudo inside the container, so one can immediately install packages in the container and so forth. Note that, by default, Distrobox executes the user's login shell when entering a container, but this can be changed if one wants to use (say) the Fish shell on the host system but GNU Bash inside a Distrobox container.

The purpose of setting a home directory is not to provide isolation from the user's home directory, but to avoid clutter. If no home directory is specified, the guest container will use ~/; that may be undesirable if one wants to maintain a separate set of configuration files or project directories in a Distrobox. Applications and processes in the Distrobox will still be able to access files under the user's normal home directory. For example, if Distrobox container is set up with its home as /home/user/distrobox/signal then that will be set as $HOME for applications within the container. However, the applications can still access files in /home/user, /home/user/Documents, and so forth.

The distrobox create man page provides a number of useful examples to help getting started. The "distrobox create -C" command will provide a current list of images that are considered compatible with Distrobox. If a container image is not listed as compatible, that does not mean it won't work, just that it has not been tested and confirmed to work.

Naturally, Distroboxes can be destroyed as well as created: "distrobox rm name" will remove a container. That does not, however, remove the container image from the system. If the goal is to completely purge the container image as well, then it's necessary to use the container manager to do so, e.g. "podman rmi imagename".

Exporting applications and moving containers

Since Distrobox is often used to run desktop applications, it does not make sense to have to enter the Distrobox container each time one wants to run Signal or some other application. The project provides a distrobox-export command that sets up a .desktop file to launch the command directly from one's desktop. For example, this will create a launcher for the Signal desktop client:

    $ distrobox-export --app signal-desktop

Note that the command should be run from within the container created by Distrobox, not on the host. Assuming that the user is running a desktop environment like GNOME, KDE, or Xfce, an entry for Signal should show up in whatever menu or launcher is being used. Now it's not necessary to use "distrobox enter" at all to run Signal, it can be run like any other desktop application that is installed on the host. Even though Distrobox prioritizes speed in starting containers, there is usually a small but noticeable lag when launching an application from a container that hasn't started yet.

Alternatively, one might want to use a Distrobox container as their primary command-line environment. Some terminal emulators, such as Ptyxis, offer integration with Distrobox and other container tools; a user can set Ptyxis to open new terminal windows in the container automatically. This is particularly handy on image-based systems where one cannot install software directly on the host using APT or DNF. I set Ptyxis to use a Fedora container by default and do my work in the container and install additional software therein. To distinguish between working in the host terminal and in my default container, I set the color palette to "Borland" from the Gogh set of color schemes for terminals. The old-school look is appealing, and I don't get it confused with the black-on-green theme for regular terminals.

The "distrobox assemble" command can automate the creation of one or more Distroboxes. It takes an INI file with specifications on how to create a new container or multiple containers. For example, this is a simple distrobox.ini that would create a container using a Fedora Rawhide image with several packages that I use regularly. The pull=true option tells distrobox to go ahead and pull the container image if it is not available on the system.

    [rawhide]
    additional_packages="emacs emacs-pgtk aerc tmux git lolcat bat"
    image=fedora:rawhide
    pull=true
    home=/home/jzb/distrobox/rawhide

Jorge Castro has written a good blog post on using "distrobox assemble" that is worth reading for anyone using Distrobox.

The project is not on a time-based schedule, so releases are somewhat sporadic. There is also no roadmap to follow for future releases. Generally, Distrobox seems mostly feature complete, so new versions seem to be mostly about bug fixes or catching up to changes in Linux distributions and container tooling. The most recent feature release was version 1.8.2.0 on October 28 which included Bash completion enhancements, added support for new guest distributions, and included quite a few documentation changes as well as bug fixes. With that release, di Maio also announced the addition of Alessio Biancalana as a maintainer, and Biancalana has headed up the recent minor releases. The most recent is 1.8.2.2.

The project does not, unfortunately, have a mailing list or even a web forum: the documentation points users to a Matrix room and Telegram group instead. Users interested in making contributions or reporting bugs should check CONTRIBUTING.md for guidance.

I've found Distrobox to be enormously useful for providing an easy and quick way to run multiple distributions on a single system. Distrobox is probably one of my most-used applications after Firefox and Emacs. Multiple versions of Alpine Linux, CentOS Stream, Debian, Fedora, openSUSE, Ubuntu, and others are just a few keystrokes away any time I need them.



to post comments

Huge Distrobox fan

Posted Dec 11, 2025 0:03 UTC (Thu) by jmalcolm (subscriber, #8876) [Link] (5 responses)

Great write-up.

Distrobox has become an absolutely essential tool for me.

First, it is a great way to keep a system clean and organized. A dev Distrobox for a project is not only a great way of giving an app the exact dependencies it needs but it keeps them bundled together where they do not interfere with anything else. And when you are done, the entire environment can be removed, leaving the host system clean. Targeting RHEL? RHEL containers are free and legal. Dev for .NET? Put JetBrains Rider and all the .NET tools in a Distrobox.

Want to install a bunch of random apps just to try them out? I have an “experiments” Distrobox. Too much forgotten cruft built up? Just remove it.

I teach sometimes. Same story. Create a Distrobox for the class and keep all the stuff that gets installed from cluttering the host.

Want some tools to be bleeding edge and others to be rock stable? Two different Distroboxes (maybe Arch and Debian).

And Distrobox is a better Flatpak, giving access to packages regardless of Distro. I use Chimera Linux often which not only has a small package repo but uses musl and BSD utils. I always add an Arch Distrobox to it. Something not in the repos? It will be in Arch. Something absolutely needs glibc? Distrobox. Encounter a build system with dozens of incompatible core utils calls? Distrobox? Running on hardware that needs a bunch of super recent or out-of-tree modules? Build an Arch or Cachy kernel in Distrobox and copy it to the host.

Distrobox is the best.

Huge Distrobox fan

Posted Dec 11, 2025 7:35 UTC (Thu) by g7s (guest, #179703) [Link]

Especially nice If your company forces you to use a certain Linux distribution and you just want to work in your native environment which you are used to.
My current use-case for Distrobox is to use it to escape my host system, which is Ubuntu. I simply install my distribution with Distrobox and do all my work inside of it :)

Huge Distrobox fan

Posted Dec 12, 2025 10:51 UTC (Fri) by paulj (subscriber, #341) [Link] (2 responses)

This sounds like a very useful tool... but... docker is a complete dumpster fire.

Does it still work well with the other 2 supported container tools, podman and this 'lilipod'?

Huge Distrobox fan

Posted Dec 12, 2025 14:08 UTC (Fri) by jzb (editor, #7867) [Link]

I've only used Distrobox with Podman, actually. It supported Podman first and then added support for Docker later on. So, yes -- works just fine with Podman and I imagine lilipod as well since that's also di Maio's work.

dumpsterfire ... tell us more

Posted Dec 13, 2025 12:25 UTC (Sat) by grmnsftphr (subscriber, #178591) [Link]

can you be more specific what your problems are with docker than dumpsterfire?

From my own experience from working with the takeaway that Docker simply works, unless you insist on sticking with the ancient Debian packages.

In contrast, podman had many incompatbilities, not last to the completely undiagnosable network stack... which is following the Douglas Adams model and thus constantly getting completely rewritten. This isn't safe nor secure.

The podman code base has quite some quality issues such as incorrect usage of contexts and left-over API experiments. This was acknowledged on the issue tracker but it's don't fix.

I've written Docker drivers and can say from first hand experience that the Docker code base is quite good to understand. In contrast I had so many w-t-fs with podman code and their totally broken APIs, both Docker "compatible" and proprietary, that after months of work on podman-native support I decided to archive my project.

Similar experiences can be seen from other projects where podman doesn't really reliably work on broader scope and non-trivial setups.

Huge Distrobox fan

Posted Jan 7, 2026 20:40 UTC (Wed) by archaic (subscriber, #111970) [Link]

Totally agreed. And while desktop apps are probably the more complicated use-case, I really go in for being able to run cli utils on my rather antiquated laptop. Joe mentioned, specifically distrobox-export --app signal-desktop but I almost exclusively use: distrobox-export --bin [path/to/binary]. I don't enter the boxes after that. Then a wrapper is placed in ~/.local/bin/ and so when I type "vim" it runs the wrapper which automatically uses the one found in the container. I even use multiple versions of rustc, gcc, python, etc, pretty much whatever I need when I need it as if it were installed directly on my OS. Granted, gems/pips/cpans can be bit more difficult to use, but not impossible!

My main motivation to start using it was when I was playing with image-based OSs. My motivation then pivoted to using it to keep my host OS clean. Now, my main motivation is using it for fine-grained version control of several specific apps while retaining the other benefits as well. For the times when I need the isolation, I use podman rootless containers. Not as seemless, but their purpose is different.

Toolbx is not just for Fedora

Posted Dec 11, 2025 8:57 UTC (Thu) by andrewsh (subscriber, #71043) [Link]

Toolbx also works with Debian and Ubuntu.

Recommendation for running an old program

Posted Dec 11, 2025 16:39 UTC (Thu) by abatters (✭ supporter ✭, #6932) [Link] (11 responses)

So I want to keep an old version of a specific gnome application (gthumb) working on modern Ubuntu while giving it access to files in my home directory. What is the best way? Distrobox, snap, flatpack, docker, linux containers, etc.?

Recommendation for running an old program

Posted Dec 11, 2025 18:20 UTC (Thu) by jzb (editor, #7867) [Link] (10 responses)

My first questions would be "how old?" and "how specific a version?" Probably Distrobox is the best option unless you want a super-specific version (e.g., not one present in an Ubuntu or another distribution). I tried this to see if I ran into any problems:

distrobox create -i ubuntu:20.04 -n oldbuntu -H ~/Distrobox/oldbuntu --additional-packages gthumb

It seems to work just fine. You might want to omit the "-H ~/Distrobox/oldbuntu" option though, and change the Ubuntu release to a different LTS that has a version that you want.

Recommendation for running an old program

Posted Dec 11, 2025 19:38 UTC (Thu) by abatters (✭ supporter ✭, #6932) [Link] (9 responses)

It is a very old version from another old Ubuntu version. I don't have it here right now but I think it is around version 3.2 or 3.3, which are 10-15 years old. For years I have been recompiling the old source on newer distros but it isn't working so well anymore. (Without being too negative about it, I just like the old version much better than the new versions.)

Recommendation for running an old program

Posted Dec 11, 2025 19:50 UTC (Thu) by jzb (editor, #7867) [Link] (5 responses)

A quick search suggests that it'd be 3.2.x, it looks like 3.3 had a UI change and Ubuntu stuck with 3.2 for a bit. What I'd do is create a distrobox from, say, Ubuntu 20.04 (assuming it compiled from source cleanly there) and then compile from source in that distrobox and keep that. Should work just fine.

Recommendation for running an old program

Posted Dec 11, 2025 19:53 UTC (Thu) by abatters (✭ supporter ✭, #6932) [Link]

Thanks, I'll try that over the weekend.

Recommendation for running an old program

Posted Dec 12, 2025 22:41 UTC (Fri) by jmalcolm (subscriber, #8876) [Link] (3 responses)

If gThumb 3.4.3 is old enough for you, Distrobox has your back.

distrobox create -n gthumbbox -i docker.io/ubuntu:16.04
distrobox enter gthumbbox
export GDK_BACKEND=x11
export CLUTTER_BACKEND=x11
sudo apt install gthumb
gthumb &

Keep in mind that running libraries from old distros like this may be a security concern. 16.04 LTS is still getting EMS updates though.

If you are behind a firewall and only running gthumb, it does not seem like big deal but some folks would disagree. One of the benefits of Distrobox is that you get to make that decision vs. Flatpak that will pull old runtimes even if you have apps that depend on them.

If you are ok with no security updates, you can try 14.04 as well. I was able to run gThumb 3.2.7 via the following:

distrobox create -n ggg -i docker.io/ubuntu:14.04 --pre-init-hooks "mv /usr/bin/apt /usr/bin/apt.back && touch /usr/bin/apt && chmod +x /usr/bin/apt"
distrobox enter ggg
sudo apt-get install gthumb
gthumb &

The --pre-init-hooks thing is required as otherwise Distrobox fails to setup the container as it tries to run apt and fails. You should "sudo mv -v /usr/bin/apt.back /usr/bin/apt" once you are in the container to put apt back.

Running very old Linux versions requires a bit more futzing around. Still, this shows the power of Distrobox. The version of gThumb above was compiled with GCC 4.8.4 against eglibc 2.19 and for x11. It ran flawlessly on my musl native, Wayland native Chimera Linux install via Distrobox. I love it.

Recommendation for running an old program

Posted Dec 13, 2025 1:47 UTC (Sat) by abatters (✭ supporter ✭, #6932) [Link] (2 responses)

Yes, gthumb 3.2.7 is the version I like, although even with that version I have to apply a few of my own patches to revert some changes that were already annoying me. Thanks for all the info. Looks like I have several options to try.

Recommendation for running an old program

Posted Dec 13, 2025 3:14 UTC (Sat) by abatters (✭ supporter ✭, #6932) [Link] (1 responses)

I got it working. Compiled from source with a few tweaks on distrobox Ubuntu 20.04. Amazingly easy, given that I already did all the work to get it working on Ubuntu 20.04 previously. Thanks for all the suggestions!

Recommendation for running an old program

Posted Dec 14, 2025 23:47 UTC (Sun) by jmalcolm (subscriber, #8876) [Link]

This is really the best solution. I am glad you got it working so easily.

I love that you can use old distros though. That would allow running a tool that no longer builds easily with modern toolchains or even binaries for which you do not have source code.

The latter case may even be for something recent. For example, I may have a proprietary binary for RHEL. With Distrobox, I can run that anywhere without weird bugs from using the wrong libraries.

Welcome to the Distrobox club. I think you are going to love it.

Recommendation for running an old program

Posted Dec 11, 2025 21:51 UTC (Thu) by jmalcolm (subscriber, #8876) [Link] (2 responses)

In my experience, it will be a bit of work to try to create a Distrobox from a distribution that old. It can probably be done but it will fight you. I ran into a few roadblocks trying to create a Distrobox for a version pre-Fedora Red Hat Linux.

You are also going to have trouble finding a container registry with something that old in it. So, you would at be at least creating and managing your own container.

If you have had luck running your app on "old" but not "ancient" versions of Ubuntu, I would target that version instead. If that works for you, Distrobox will be fantastic.

Recommendation for running an old program

Posted Dec 11, 2025 22:01 UTC (Thu) by jzb (editor, #7867) [Link] (1 responses)

FWIW the Docker registry still has versions of Ubuntu going back to 14.04. All LTSes, I think. I didn't have any trouble whatsoever with the example I gave using 20.04 here. But, yeah, I'd suggest going with the newest old version that works for compiling gthumb without headaches if that's the goal.

Recommendation for running an old program

Posted Dec 12, 2025 22:48 UTC (Fri) by jmalcolm (subscriber, #8876) [Link]

Ubuntu 14.04 did not install right out of the box for me. See my comment above for how I worked around it. Ubuntu 14.04 has gThumb 3.2.7 in it which I think is the UI he is looking for.

I think I replied to the wrong comment. He may not even see my post.

Forums and mailing lists

Posted Dec 18, 2025 17:00 UTC (Thu) by Vorpal (guest, #136011) [Link] (7 responses)

> The project does not, unfortunately, have a mailing list or even a web forum: the documentation points users to a Matrix room and Telegram group instead.

Is that really "unfortunately" though? Sure, a forum would be nice (and more searchable than matrix / telegram), but mailing lists are a pain. You are guaranteed to get spam on whatever email you use soon after ever sending a mail to a public list like LKML.

I would like to see a Discourse or Zulip instance if the project doesn't want to use github discussions (or whatever the gitlab equivalent is). But I absolutely don't miss mailing lists.

Forums and mailing lists

Posted Jan 7, 2026 20:46 UTC (Wed) by archaic (subscriber, #111970) [Link] (6 responses)

> Is that really "unfortunately" though?

Yes, it is. In this day of more information than any 100 people could assimilate in a single day, I require all info I care about to be pushed to me. I cannot spend time looking for it nor "following" it in the manner of modern social networking.

I'm not saying email is perfect, ideal, best, or even all that good. But until everything supports RSS, it's what I'm able to dedicate brain cycles towards.

Forums and mailing lists

Posted Jan 7, 2026 21:21 UTC (Wed) by Wol (subscriber, #4433) [Link] (5 responses)

I have to agree. I can manage spam. I know how to set up filter rules in my email client, and I often filter ham rather than spam (that's quite a good tactic).

Pretty much all the web fora I read are a pain in the arse to filter. LWN's "unread comments" is one of the best, by a long way, but it's still seriously flawed. I hate web fora because - even when I know exactly what I'm looking for - it's usually a pita to find it again.

Cheers,
Wol

Forums and mailing lists

Posted Jan 7, 2026 21:27 UTC (Wed) by corbet (editor, #1) [Link] (4 responses)

If you have suggestions for how the "unread comments" page could be improved, we're definitely all ears...

Forums and mailing lists

Posted Jan 8, 2026 7:52 UTC (Thu) by Wol (subscriber, #4433) [Link]

One simple - to me rofl as a user - improvement would be to have better context. It's good now, but there's a little tweak of an improvement ...

I can't remember whether it's a setting or a default, but unread comments have their read parent above. Each read parent is the root of a tree of comments BUT. Sometimes it's also an immediate child of another read parent. It would be nice if it displayed as child, not root.

Of course, that's easy for me to say, it might not be for you to code! :-)

Apart from that, searching. I just find Thunderbird works great for me. Because I can organise things how I want, everything is local, I'm a grumpy old man who wants everything to work like it did 30 years ago rofl ... I just don't see how web fora can match that ...

And of course, Thunderbird keeps everything in one place. If I have to go to one forum for this, one forum for that, one forum for the other ... I hate push notifications, and Thunderbird is a great intermediary for receiving push notifications and hiding them from me until I'm ready - it's called "unread mail" :-)

Cheers,
Wol

Forums and mailing lists

Posted Jan 8, 2026 9:35 UTC (Thu) by taladar (subscriber, #68407) [Link] (1 responses)

Not really related to this thread in particular but one improvement that would be nice would be if the "please stop responding to this discussion" comment wasn't at the bottom of the discussion but right at the top of the comment thread you want people to stop responding to.

Forums and mailing lists

Posted Jan 8, 2026 10:44 UTC (Thu) by Wol (subscriber, #4433) [Link]

Agreed. Oh - and another one, please can we have all articles over - say - three months old automatically go into moderated status. It doesn't happen often, but if new comments are added to old articles, it's often very tempting click-bait. I sometimes respond without realising the article is several years old.

Fine if responses are relevant, but "me too" to an old article is not good. Hence preferring moderated rather than closed comments.

Cheers,
Wol

Forums and mailing lists

Posted Jan 9, 2026 18:21 UTC (Fri) by karkhaz (subscriber, #99844) [Link]

Would it be possible to include an <InReplyTo> tag for each item in the Latest Comments RSS feed, that refers to the <guid> of the comment (or <url> of the article) that the item is replying to? This would help when reading comments in an email client.


Copyright © 2025, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds