Distrobox lets you run a complete second (or third, or fifth) Linux distribution inside a Podman container, with your $HOME mounted, GUI apps working through the host’s display, USB devices accessible, and your shell shared. For developers who need an Ubuntu environment on a Fedora workstation, a CUDA dev environment on an Arch box, or a clean sandbox to try a tool without polluting the host, this is the right pattern.
How to verify
A working Distrobox install responds to these probes:
distrobox --version
podman --version # distrobox needs podman or docker
distrobox list
distrobox create --help | head -20
echo $XDG_RUNTIME_DIR
$XDG_RUNTIME_DIR is what Podman uses to keep the container’s runtime state — it must exist. On a fresh user, loginctl enable-linger is needed if you want the container to survive logout.
What’s happening
Internally, Distrobox is a shell script that wraps podman create/podman exec with a specific recipe: mount $HOME from the host, mount X11/Wayland sockets, mount /run/user/$UID/pulse for audio, mount /dev/dri for GPU access, drop the right capabilities, set the right environment variables. The result is a container that feels like a full Linux install but shares the host’s home directory, display, and most devices.
Crucially, the container is not isolated. You see your host’s files, you can run X11 apps that display on the host’s screen, and you can read host devices. Distrobox is not a security boundary — it is a “different toolchain, same workstation” tool. For genuine isolation, use a regular Podman container without the distrobox flags.
The killer feature is distrobox-export: it generates a launcher on the host that, when invoked, runs the inner command inside the container. So you can install goland inside an Arch container on a Fedora host, run distrobox-export -a goland, and now goland appears in the host’s app menu — clicking it runs the Arch-installed JetBrains IDE.
The procedure
- Install Distrobox. It is just shell scripts plus dependencies:
sudo apt-get install -y distrobox podman
On Fedora, use dnf install distrobox; on Arch, pacman -S distrobox.
- Create a container running a different distro than the host. The first run pulls the image:
distrobox create --name ubuntu-dev --image docker.io/library/ubuntu:24.04
distrobox enter ubuntu-dev
# you are now in Ubuntu, with your home dir mounted
sudo apt update && sudo apt install -y build-essential python3-pip
The sudo works inside the container — Distrobox configures passwordless sudo for the current user automatically.
- Verify the home directory is shared:
# inside the container
ls ~/ # shows the host's home
echo "hello from ubuntu" > /tmp/test.txt # /tmp is the container's
# outside the container, on the host
cat /tmp/test.txt # does not exist on host — /tmp is per-container
ls ~ # same files as inside
- Run a GUI application from inside the container, displayed on the host. The X11/Wayland sockets are passed through automatically:
distrobox enter ubuntu-dev -- firefox &
# firefox window appears on your host's desktop
- Export a container-installed command to the host. This creates a
.desktopfile and a wrapper script:
distrobox enter ubuntu-dev -- sudo apt install -y inkscape
distrobox-export --app inkscape # inside the container
# back on the host:
which inkscape # /home/operator/.local/bin/inkscape — a wrapper
inkscape # launches the container's inkscape
- Use an Init container for systemd-style services inside the box. Useful for developer environments that include local databases or queues:
distrobox create --init --name db-dev \
--image docker.io/library/ubuntu:24.04 \
--additional-packages "systemd postgresql"
distrobox enter db-dev
sudo systemctl start postgresql
sudo -u postgres createdb mydevdb
- Clean up containers you no longer need:
distrobox list
distrobox stop ubuntu-dev
distrobox rm ubuntu-dev
Common pitfalls
- Confusing Distrobox with Toolbx — they share much of the same UX but Toolbx is Fedora-specific and uses different defaults. Distrobox is the cross-distro variant.
- Expecting isolation. Distrobox containers see your host files; they can read your SSH keys, your shell history, your GPG agent. Never
distrobox enteran image you do not trust. - Running Docker-style containers inside a Distrobox container without nested-podman support. Possible but fragile — for nested containers, use LXD or a VM.
- Forgetting
--initand being surprised systemd does not work inside the box. The flag is required for any service-style workflow. - Letting the container’s storage grow in
~/.local/share/containers/storage— every package install adds layers. Remove unused containers periodically withdistrobox rm.
Stack Harbor uses Distrobox for engineers who work across many client stacks — Ubuntu LTS clients, RHEL clients, Alpine-based microservice clients — without rebuilding workstations between projects. See managed operations for the per-client developer-environment images we curate and the export-policy that controls which apps surface on the host.