How to use Distrobox on Bazzite

March 19 2025 11:39pm • Est. Read Time: 4 MIN

Distrobox is a versatile tool that allows you to run containerized Linux distributions within your current Bazzite system. It leverages container backends like Podman or Docker to create isolated environments without modifying your immutable base system. In addition, Distrobox can be integrated into your native OS, enabling you to launch containerized applications directly from your software menu. Tools like BoxBuddy further simplify this integration by providing a graphical interface to manage these containers, install new distributions, and make applications executable.


Why Use Distrobox?


While Bazzite provides a stable and immutable core system, there are many scenarios where you need the flexibility to run alternative or containerized environments. Distrobox offers several advantages:

  • Flexibility: Run a completely different Linux distribution on top of Bazzite for development, testing, or specialized tasks.
  • Isolation: Experiment with new software in an isolated container environment without affecting your primary system.
  • Seamless Integration: Enjoy a high level of integration where the container shares your host’s file system, display, and user settings.
  • Native Application Launching: Integrate applications installed within Distrobox into your native OS software section, making them easily launchable.


How Distrobox Works


Distrobox creates a containerized Linux environment using a container engine like Podman or Docker. It then configures the container so that it shares many resources with your host system, including the file system, display, and even certain user configurations. This makes the container feel like a natural extension of your desktop.

Basic Distrobox commands include:

  • distrobox create -i <image> -n <name> – Create a new container environment.
  • distrobox enter -n <name> – Enter an existing container.
  • distrobox list – List all active container environments.
  • distrobox rm -n <name> – Remove a container environment.


Basic Usage Example


Creating a New Distrobox

To create a new Distrobox container, run:

distrobox create -i docker.io/library/ubuntu -n ubuntu-box
  

This command creates a container named ubuntu-box using the official Ubuntu image.

Entering a Distrobox Environment

To enter your container, run:

distrobox enter -n ubuntu-box
  

You will now have a shell inside the Ubuntu container.


Installing OSes with BoxBuddy


BoxBuddy, which comes pre-installed on Bazzite, provides a graphical interface that can help you install new Linux distributions (or “OSes”) inside Distrobox containers. Rather than running distrobox create commands manually, you can:

  • Open BoxBuddy: From your application menu, launch BoxBuddy.
  • Select “Add Box” or Similar Option: BoxBuddy typically offers a button or menu item to create a new container.
  • Choose a Base Image: BoxBuddy will allow you to select a base image (e.g., Ubuntu, Fedora, Alpine) from a list or enter a custom one.
  • Name Your Container: Give your container a descriptive name for easy identification.
  • Complete the Setup: BoxBuddy automates the process of pulling the image and creating the container, so you don’t have to remember or type out the distrobox create command.

Once created, your new container will appear in BoxBuddy’s main interface. You can then enter it, install packages, and manage it just like any other Distrobox environment.


Integrating Distrobox Applications into the Native OS


One powerful feature of Distrobox is the ability to integrate applications from within a container into your native desktop environment. This means you can launch containerized applications as if they were installed directly on your system.

Example: Creating a Desktop Shortcut

Suppose you have installed an application (for example, a text editor) within your ubuntu-box container. You can create a .desktop file so that the application appears in your native software section.

Create a file called ~/.local/share/applications/ubuntu-texteditor.desktop with the following content:

[Desktop Entry]
Name=Ubuntu Text Editor
Comment=Launch the text editor from the Ubuntu container
Exec=distrobox enter -n ubuntu-box -- <command-to-launch-texteditor>
Icon=utilities-terminal
Terminal=false
Type=Application
Categories=Utility;
  

Replace <command-to-launch-texteditor> with the command to start your text editor (for example, gedit). Once saved, the application will appear in your native application menu.


Using BoxBuddy for Native Integration


BoxBuddy further simplifies integrating Distrobox applications into your native OS. Instead of manually creating .desktop files, BoxBuddy provides a graphical interface.

From the View Applications section in BoxBuddy, you can see a list of installed applications in your Distrobox container. You will typically have two main actions:

  • Run: Launches the selected application directly from the container.
  • Add To Menu: Creates a menu entry for the selected application, enabling you to launch it from your desktop’s application menu without further container commands.

BoxBuddy interface showing a Distrobox container’s installed applications with options to Run or Add To Menu.


This method provides a seamless user experience, letting you benefit from the flexibility of containerized environments while maintaining a unified desktop interface. Simply click Add To Menu, and the containerized application will appear in your native OS application launcher.


How This Differs from a Virtual Machine


While Distrobox and BoxBuddy let you run entire Linux distributions in containers, it’s important to note that this is not the same as running a full virtual machine (VM). Here are some key differences:

  • Resource Overhead: Containers share the host’s kernel and resources, typically resulting in lower overhead compared to a VM, which emulates hardware and runs its own kernel.
  • Performance: Since containers don’t require hardware virtualization, they often run faster and more efficiently than a VM with the same software.
  • Isolation Level: Containers isolate processes at the kernel level, while VMs isolate entire operating systems with virtual hardware. VMs can provide stronger isolation but at a higher resource cost.
  • Integration: Distrobox containers integrate tightly with the host file system, display, and user settings, whereas a VM typically runs in a separate environment that requires additional setup for shared folders, GPU pass-through, or other integrations.

In short, containers are ideal for lightweight, efficient, and tightly integrated environments, while VMs are better for scenarios requiring full hardware-level isolation or running entirely different operating systems with their own kernels.


Other Use Cases for Distrobox


Beyond development and testing, Distrobox can be used in various scenarios, such as:

  • Legacy Support: Access older or specialized distributions required by certain applications.
  • Isolated Workspaces: Create containerized environments for specific projects to avoid dependency conflicts.
  • Experimentation: Safely try new software or configurations in an isolated container without risk to your primary system.


Summary


Distrobox on Bazzite provides a flexible, container-based solution to run alternative Linux environments alongside your stable, immutable base system. With simple commands to create, enter, list, and remove containers—or by using BoxBuddy’s graphical interface—you can install new distributions and manage them with ease.

Furthermore, with native integration—either by manually creating .desktop files or using BoxBuddy’s Add To Menu feature—applications installed within a Distrobox container can appear in your native OS software section, allowing for a seamless desktop experience. Compared to a full VM, Distrobox containers offer lower overhead, faster performance, and tighter integration with the host system.