Like magic, Distrobox runs applications from different Linux distributions right on your Linux computer.

Theyre running on your box, yet theyre in their own native distribution.

We show you how it works.

An Ubuntu desktop with Linux Mint, Arch Linux, Fedora, and Debian Linux containers open in terminal windows

Dave McKay/How-To Geek

The Problem With Regular Containers

Containers are a form of virtual machine.

A traditionalvirtual machinehas a complete installation of an operating system inside it.

Scripts can control their creation, use, shut-down, and removal.

Installing Docker on Ubuntu with the apt command

Just as they are with virtual machines, theapplicationsinside containers are isolated from the host system.

Distrobox containers also benefit from hardware pass-through.

If you plug in a USB rig, for example, the container can see it too.

Installing Docker on Fedora using the dnf command

How to Install Distrobox

Distrobox uses eitherDockerorPodmanas the underlying container management system.

Were going to use Docker.

If you dont already have Docker on your gear youll need to install it.

Using the pacman command to install Docker on Manjaro

Installing Docker

Docker is available in the repositories of the major distributions.

To install Docker on Ubuntu, use this command.

We create the group with groupadd command.

Creating the docker user group on Ubuntu

Docker may have created the group for you.

If that’s the case, you’ll be told it already exists.

Either way, we need to add you to that group, using the usermod command.

Adding a user to the docker group on Ubuntu

Youll need to sign in and out to activate your group membership.

Installing Distrobox

Installing Distrobox is even easier than installing docker.

This step requires animage file.

Using the apt command to install Distrobox on Ubuntu

We can go for the image we want to use from thelist on the Distrobox website.

The list is in alphabetical order by distribution name, starting at AlmaLinux and finishing at Void Linux.

Many distributions are available in several versions.

Using the dnf command to install Distrobox on Fedora

Versions that have “toolbox” added to their name include a set of default programs.

Those without “toolbox” are lightweight images.

Were going to create an Arch Linux container.

Using the pacman command to install Distrobox on Manjaro

Copy the web address for the image youre going to use, and paste it into the following command.

Were using the Distrobox create command to create a container.

The -i (image) option tells Distrobox which image to use.

Creating an Arch Linux container with Distrobox

The -n (name) option sets a name for the container.

It also becomes the host name for the virtual computer inside the container.

Youre prompted to download the image to your gear.

Answering “Y” for yes in the container creation process

Press Y and hit the Enter key.

All the downloads we tried were surprisingly fast.

Theres some housekeeping to be performed the first time the container is launched.

Launching a Distrobox container

On our test machine this took one or two minutes.

When youre returned to the command prompt, take a look at it.

Itll say the name of the container youve created and entered.

The housekeeping performed on the first launch of a Distrobox container

Youre now inside an Arch Linux container.

Running the ls command shows the home directory of our Ubuntu host computer.

But Distrobox lets us start the program from outside the container, from our host computers command prompt.

Installing neofetch on an Arch Linux container

The -T (no tty) option supresses the creation of a new terminal window.

-n (name) command tells Distrobox which container to look inside for the command.

Opera is launched and runs on your desktop as though you had installed it on the host computer.

The output of neofetch on an Arch Linux container

Its clear that the launched utility has access to your host computer.

The internet tool is storing its prefs on the Ubuntu host.

Other Useful Commands

To exit from a container, jot down exit and hit Enter.

Listing the files in the host computer’s home directory from inside an Arch Linux Distrobox container

Youll see the prompt return to that of your host computer.

The container is still running though.

If you want to shut down the container, use the stop command.

Installing the Opera browser inside an Arch Linux Distrobox container

you should probably confirm that you really do want to stop the container.

To see which containers youve created, use the list command.

Color is used to highlight which containers are running and which are not.

Launching an application installed ina Distrobox container from the command prompt of the host computer

you could remove, as in delete, a container with the distrobox rm command.

There’s no longer a reason to miss out on any program from any distribution.

The Opera browser running on an Ubuntu desktop, launched from an Arch Linux Distrobox container

The opera config files are stored on the host computer, not in the Arch Linux Distrobox container

Exiting from a Distrobox container

Stopping a running container with the distrobox stop command

Listing the Distrobox containers present on the host computer

Removing (deleting) a Distrobox container