Running Ubuntu and Arch Apps on Fedora: The Ultimate Distrobox Guide

Fedora tutorial - IT technology blog
Fedora tutorial - IT technology blog

Why do you need Distrobox even while using Fedora?

I’ve been using Fedora Workstation for over 2 years. This operating system is extremely balanced: stable enough for work, yet fresh enough to experience new tech. However, as a tech person, it’s hard to avoid those “stuck” moments: needing to install a tool available only on the AUR (Arch Linux) or running an old Python library from the Ubuntu 18.04 era.

Previously, I usually struggled with VirtualBox or Dual-booting. VMs consume at least 4GB of RAM just to boot, while Dual-booting breaks the coding flow every time you switch OSs. Podman or Docker are good alternatives, but getting them to display a GUI or access files in the Home directory is often a hassle.

Distrobox solves this problem completely. At its core, it’s a wrapper running on Podman or Docker. It creates environments like Ubuntu, Arch, or Kali right inside the Fedora Terminal. The biggest difference is that it automatically mounts the Home directory. You can open files with Fedora’s VS Code and compile with an Ubuntu compiler in an instant.

Quick Installation of Distrobox and Podman

On Fedora, Podman is the “darling” supported to the hilt by Red Hat, running rootless and extremely securely. Distrobox borrows Podman’s power to manage containers.

Open the Terminal and type the installation command:

sudo dnf install distrobox podman -y

Next, check the version to make sure everything is ready:

distrobox --version

Usually, Fedora comes pre-configured for Podman. You just need to install it and it’s ready to use, no complex service setup required.

How to Create and Use Your First Container

Suppose I need an Ubuntu 22.04 environment to test an old script. Instead of reinstalling my machine, I’ll “summon” Ubuntu with just one command.

1. Create a New Container

Use the distrobox create command to initialize. Here, I’ll name it ubuntu-dev:

distrobox create -n ubuntu-dev -i docker.io/library/ubuntu:22.04

This command downloads the image from Docker Hub. The Ubuntu base image is only about 75MB, dozens of times lighter than a typical VM ISO file.

2. Enter the Environment

To start working, use the enter command:

distrobox enter ubuntu-dev

The first time it runs, the system will take about a minute to sync users and basic package configurations. When the prompt shows user@ubuntu-dev, you are officially inside Ubuntu within your Fedora OS.

From here, feel free to use apt update or apt install. These changes stay entirely within the container, without cluttering your main Fedora system.

3. Export Applications to the Fedora Menu

This is the most valuable feature. Suppose you install Microsoft Edge (deb version) on Ubuntu but want to open it from the Fedora GNOME menu.

Install the app inside the container first:

sudo apt update && sudo apt install wget -y
wget https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_110.0.1587.41-1_amd64.deb
sudo apt install ./microsoft-edge-stable_110.0.1587.41-1_amd64.deb

Next, export the app using the command right inside that container:

distrobox-export --app microsoft-edge-stable

Now, just press the Windows key, type “Edge,” and the app will appear. When you click it, Fedora will automatically start the container in the background to launch the browser. The experience is as smooth as a natively installed app.

System Management and Cleanup

If you use multiple containers (e.g., one for Arch to use the AUR, one for Debian to test a server), you need to know how to manage resources.

List Containers

Check which OSs you have with the command:

distrobox list

Check Resource Usage

Since they are containers, you can monitor the actual RAM they are consuming using Podman’s command:

podman stats

If the machine feels slow, you can stop containers with distrobox stop [name] to free up RAM immediately.

Remove When Done

Once finished, clean up to reclaim disk space:

distrobox rm ubuntu-dev

Note: This command wipes the virtual OS, but files in your Home directory remain safe. This is thanks to Distrobox’s intelligent data-sharing mechanism.

Distrobox helps me leverage the software repositories of every Linux distro without sacrificing Fedora’s stability. If you’re a dev and frequently run into library conflicts, give this tool a try. It will make your workflow much more professional and streamlined.

Share: