Developer tools
Need a compiler, apt, or a header package? Run a full mutable distro in a container — without weakening the read-only system underneath.
New in 0.3.0 · testing channelFlatpak is the answer for applications, and it deliberately has no answer to “I need a compiler
and a header package” — that is not an application window. Distrobox is the other half: it runs
a complete, ordinary, mutable Linux distribution inside a rootless container, with your home
folder, the Wayland session and the desktop shared straight through. You get apt, dnf or
emerge on a system whose own root stays read-only.
This does not weaken the no-toolchain guarantee, it completes it. The shipped image still contains no compiler, no package manager and no headers — those assertions run on every build. What changes is that there is now a sanctioned place for a compiler to be: in a container, in your data, deletable with one command, instead of the alternatives being “rebuild the image” or “give up”.
Creating a box
Nothing is preloaded, so the first create pulls its base image over the network — about 400 MB for the default Debian stable:
$ distrobox create --name dev
$ distrobox enter dev
Inside, you are still you — same user, same home folder, same files — but the package manager is real:
$ sudo apt install build-essential python3-dev
A docker command is also available: it is a thin wrapper over the same rootless podman, so
muscle memory and existing scripts keep working. No docker daemon runs anywhere.
Getting things out
- Terminal work stays in the box:
distrobox enter devany time. - An application installed in the box can be exported to the Plasma menu:
distrobox-export --app gimpputs a real launcher alongside your Flatpaks. - Files need no exporting at all — the box shares your home directory.
Where it lives, and what that means
Container storage sits in your data partition, not the system image. Concretely:
- Updates and rollbacks never touch a box. The system image is replaced wholesale; your containers are data, and data is not the system image.
- A factory reset removes them, along with everything else in your data.
distrobox rm devdeletes one box and its compiler, exactly.
In a virtual machine
A raw image booted directly in a VM has a small data partition that never grew — under a gigabyte free after the bundled Flatpaks, which is enough to create one box and nothing more. On real hardware the partition fills the disk at first boot and this never bites. Give a test VM a larger disk if you plan to keep containers in it.The design notes — why rootless podman rather than a docker daemon, what ships to make it work,
and the measured cost — are in the repository,
plan/13-distrobox.md.