Yahoo
Advertisement
Advertisement
Advertisement
Advertisement

Forget distro hopping: How to use any Linux distribution on one PC

Linux mascot jumping between large bouncing icons of different Linux distributions.
Linux mascot jumping between large bouncing icons of different Linux distributions.

You don't need to dual-boot or switch between distros. Distrobox lets you install and run any Linux distribution inside a virtual container or "box." You can access that distro's package manager and install apps (GUI or CLI) that run within your native distros desktop space.

How I stopped distro hopping

A few years ago, I suffered from a kind of "shiny object" syndrome for Linux distributions. Instead of installing and setting up an OS and using it daily for work, I kept switching to every new distro I came across. I later found out it's actually fairly common among Linux hobbyists. So common, in fact, that there's a name for it. It's called "distro hopping."

Some Linux Distro screens.

Lucas Gouveia / How-To Geek

The weird part is that most of the Linux distros I hopped to and from were all based on Debian. When I eventually decided to settle on one setup, I realized that I was chasing aesthetics and customization with my distro hopping hobby. It was an interesting realization because the community taught me that I could customize any distro to look like any other. I could just swap out the desktop environment , the lock screen, the bootloader, and everything in between.

Linux mascot jumping between large bouncing icons of different Linux distributions.

What I can't hot swap is the default package manager and how the system handles updates. Debian and Debian-based systems, for example, use the APT package manager . The official repos for this package manager have far fewer packages than the official Arch Linux repos. The apt packages are typically not up-to-date either. With Arch and the Arch User Wiki (AUR) in particular, you get access to the latest versions of twice as many packages. I also favor Arch'spacmanpackage manager because it's much faster and has better features.

Boxes labeled A, P, and T with Pac-Man beside them and the Tux penguin behind them.

Lucas Gouveia/How-To Geek

So if I could find a way to access my favorite package managers on any Linux system, I would have no reason to distro hop. That's exactly what I did.

Running Linux boxes inside a Linux system

Docker and Podman are container engines which allow you to run services and applications inside containers or boxes. Instead of installing an app on your machine, you can run it inside an isolated sandbox which contains the app needs (libraries, dependencies, configs, everything). That's what Docker or Podman do.

Illustration of the Docker logo, featuring a stylized whale carrying containers and a NAS server.

Lucas Gouveia/How-To Geek | pixalane / Aozorastock

Advertisement
Advertisement

It takes an image (which acts like a template or a recipe) and spins up a container based on it. The image can be anything. It doesn't have to be an app or a service. It can be an entire Linux operating system.

Distrobox is a Linux designed expressly for this job. It uses Docker or Podman to spin up Linux boxes. This is different from a virtual machine because Distrobox is not emulating hardware or running a separate kernel. It's working off the native host kernel, so it gives you near-native performance.

Several Distrobox boxes open on a desktop.

All you need to do is open a terminal, enter a single command to create a new Linux box, and enter it. You can run apps (GUI or CLI) directly from the terminal using the display sockets of your host desktop. Graphical apps will pop up in a separate window on your desktop.

You can use those apps normally just like you would native apps because the Linux container (by default) has access to your Home directory. So all your files are accessible within the Distrobox container.

Setting up Distrobox

You'll need to install Docker or Podman before you can run Distrobox. If you already have Docker or Podman installed, you can skip this step. I use Docker regularly, so I'll show you how to set up Distrobox with Docker. You can use Podman, if you like.

Advertisement
Advertisement

On Arch systems, you can install Docker and Docker Compose with the following command:

On Debian and Fedora systems, try this:

These commands run an official Bash script from Docker that conveniently installs and starts the Docker engine.

Let's test if Docker is working properly.

The Hello World Docker container being run on an Ubuntu server.

If everything goes well, you should see a message confirming that Docker is running as expected. Now let's get Distrobox.

On Debian and Ubuntu systems, run this command to install Distrobox.

Arch and Fedora have Distrobox in the official repos.

Creating a Linux box and running apps

To create a new Distrobox container, you just need to know the name of the distro and the version number. For rolling distros, you can just type "latest" next to the distro's name. For example, you can create a new Arch Linux box with the following command.

An Arch Linux box created with Distrobox.

You can give the container any name next to the--nameflag. Remember that name because you'll need it to enter the container.

Arch Linux running inside a Distrobox container.

You can now install apps from the officialpacmanrepos or from the Arch User Repository and run them within this same terminal.

Installing an app on Arch Linux.
Advertisement
Advertisement

To create an Ubuntu box, you can run a command like this.

This command will get you a Fedora Box.

Typedistrobox stop container_name, to stop a distro container. You can delete a box with thedistrobox rm container_namecommand. You can stop a container withdistrobox stop container_name. Also, you can get a list of all installed boxes withdistrobox list.

A list of Distrobox containers.

There's no need to install a new Linux operating system just to access its repos and package manager. Distrobox makes it incredibly simple to create as many Linux boxes as you need. You can even run multiple Linux distros side-by-side.

Advertisement
Advertisement
Mobilize your Website
View Site in Mobile | Classic
Share by: