How to run Ubuntu programs on Fedora Linux
Fedora Linux is one of the most popular Linux operating systems out there. However, due to Fedora using RPM package files, there are just some programs that don’t work. Thankfully, it is possible to run Ubuntu programs on your Fedora Linux system.
In this guide, we’ll show you how you can leverage the power of Distrobox and container technology to install any Ubuntu program you want on your Fedora system. To begin, ensure you have an up-to-date version of Fedora Workstation or Fedora Silverblue/Kinoite.
How to install Distrobox on Fedora
To install Ubuntu programs on your Fedora Linux system, you need to install the Distrobox app. Distrobox is an excellent program, that when installed, leverages the power of Podman (or Docker) to create distro-specific containers that users can use to run programs in.
Distrobox isn’t shipped with Fedora, however, it is easy to get working. To start, open up a terminal window on the Fedora desktop. You can do this by pressing Ctrl + Alt + T on the keyboard. Or, search for “Terminal” in the app menu and launch it that way.
With the terminal window open, use the following curl command to download and install the Distrobox application to your Fedora system.
Distrobox – with root
If you’re using a personal Fedora system, and you can use the sudo command, feel free to install the root version of Distrobox. This version will allow you to access the Podman/Docker Distrobox containers with root permissions.
curl https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
Distrobox – without root (recommended)
For better security, we highly recommend installing Distrobox without root for security purposes. This version of Distrobox still allows users to use the root inside of the container, but the container files will not be installed at the system-level, for better security. Everything is contained in the user’s home directory.
curl https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- -p ~/.local/bin/
After setting up the Distrobox binary on your Fedora system, you must install the Podman container tool. This program is what will house the different operating systems you create with Distrobox. Thankfully, it is very easy to set up the Podman tool on any Fedora system.
sudo dnf install podman
Alternatively, if you do not wish to use Podman with the Distrobox tool, you can use the Docker container system instead. Docker is more feature-full and may allow you to do more advanced things with your Distrobox containers. However, Docker isn’t required, and Podman should work fine with most users.
For more information on how to set up Docker Engine on Fedora, head over to the Docker official website documentation. Once there, you’ll be able to set up the Fedora version of Docker Engine and Distrobox will automatically use it for creating operating systems.
How to set up Ubuntu with Distrobox on Fedora
To use Ubuntu programs on your Fedora system, you need to deploy the Ubuntu container with Distrobox. To do this, use the distrobox create command. This command is used to set up the container in Podman (or Docker if you’ve installed it instead of Podman).
distrobox create --name ubuntu
You must name your distrobox “ubuntu” so that you can see it when you run the distrobox list command.
After naming your Distrobox container with the --name
tag, you must specify the image in the --image
tag. For example, to install Ubuntu 22.04 LTS in Distrobox, you’d use --image ubuntu:22.04
.
distrobox create --name ubuntu --image ubuntu:VERSION
When you’ve specified the version of Ubuntu you’d like to run, Distrobox will pull down the OCI image to your computer, and deploy it as a container. You can then enter the container on your Fedora system using the distrobox enter command.
distrobox enter ubuntu
How to install Ubuntu software on Fedora
To install Ubuntu software on Fedora, do the following. First, use the apt search command to find the program you wish to install. When you’ve located the program you wish to install, use the apt install command below to install the package inside of the Ubuntu container on your Fedora system.
sudo apt install program-name
Alternatively, you can install a DEB package on your Fedora system using the apt install command below.
sudo apt install ./deb-package.deb
When the program is installed, you can export the program directly to the app menu on your Fedora system using the distrobox export command below.
distrobox-export --app program-name
When the program is exported from Distrobox, you can click on the app in the Fedora app menu to use it.