There are many times that you need some other Linux distribution on your current Linux distribution. You may need it to try out a new Linux distro, using a particular application available on a specific distro. Changing your Linux distro would be a very inconvenient and tedious process.
Distrobox is one such application for Linux that lets you use any Linux distro from your terminal. Initially released in 2021 under the name ‘simpler-toolbox,’ it was later renamed to DistroBox in 2022. Later in 2022, it was named Distrobox. Distrobox is open-source and free. This increases the transparency and trust of its users. In its starting, it just supported containerized version of a Linux distribution. Later many features were added to it.
Some of the features of Distrobox are:
- Run a different Linux distro on your terminal.
- Tight integration with the host and container Linux distro.
- Sharing of files, devices, and networking between host and container Linux distro.
- Easy to use CLI application.
- It supports a wide variety of Linux distros.
- It helps to manage multiple environments.
- Install applications on the Linux distro container.
Essential Prerequisites for Installing DistroBox
Before installing Distrobox you should take care of the following things:-
- You need sudo or root access to your system. Installing Distrobox requires administrative privileges.
- A stable internet connection is required to install DistroBox on Linux
- Update your package managers’ repositories and system as well.
- Since Distrobox uses Podman or Docker, it should be installed in your system.
Verifying Podman or Docker Installation
You can use the following commands on the terminal to find out if they’re installed in your system.
For Podman:-
podman --version
For Docker:-
docker --version
If installed, the output will show some version of either docker or podman. Otherwise, you’ll see a ‘command not found’ message.
Step-by-Step Guide to Installing DistroBox
DistroBox is a powerful open-source tool that allows you to run multiple Linux distributions directly from your terminal. Initially released in 2021, it offers seamless integration between the host and containerized Linux distros. With features like file sharing and easy-to-use CLI, DistroBox is a must-have for Linux enthusiasts. This guide walks you through the prerequisites, installation steps, and usage commands for DistroBox on various Linux distributions, including Fedora.
There are a few ways to install Distrobox on Linux. If Distrobox is available on your distro’s repositories then you can install it through it. For example:
sudo apt install distrobox
Change the package manager and installation syntax according to your Linux distro.
If it’s not available in your package manager’s repository, then you can use the following command:
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
You can also use wget as follows:
wget -qO- https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh
To install the last development version use the following command:
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --next
Or by using the wget command:-
wget -qO- https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --next
Installing DistroBox on Fedora
Distrobox is available on Copr repositories. You can install DistroBox on Fedora through Copr repositories. Follow the steps below to install Distrobox on Fedora:
- Open the terminal with sudo access. Then use the following command to enable the Copr repository:
$ sudo dnf copr enable alciregi/distrobox
- Now you can install Distrobox using the following command:c
$ sudo dnf install distrobox
How to Uninstall DistroBox
To uninstall distrobox on Linux use the following command:-
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/uninstall | sudo sh
Creating a DistroBox Container
You can create a Distrobox container using the following command:-
$ distrobox-create --name container-name --image os-image:version
For example:-
$ distrobox-create --name debian10-distrobox --image debian:10
In this example, we’ve created a container named debian10-distrobox by pulling a Debian 10 image from Docker Hub.
Listing Your DistroBox Containers
You can use the following command to get a list of containers created by Distrobox:-
$ distrobox-list
Accessing Your DistroBox Container
To access the Distrobox container you can use the following command:-
$ distrobox-enter --name container-name
For example:- We’ll be accessing the Distrobox container we created earlier in the above section as such:-
$ distrobox-enter --name debian10-distrobox
Executing Commands in a DistroBox Container
You can use the following syntax to run commands on the Distrobox container you created directly.
$ distrobox-enter --name container-name -- command
For example:- We’ll be updating the apt package manager on the debian10-distrobox we created earlier
Wrapping Up
Distrobox is a versatile and powerful tool if you want to run different Linux distros in a containerized manner. It helps you to experience a different Linux distro and learn about it. You can also test applications and use any specific applications that are available on the new distro.
In the above article, we’ve listed the prerequisites needed for installing Distrobox on your system. We’ve also listed the ways to install Distrobox on Linux. You can use the wget or curl command to install it from Git Hub. In the case of Fedora, you can use the Copr repository. You can also uninstall the Distrobox curl uninstall command.
We’ve also written about how to use Distrobox. Various commands like creating containers, accessing containers, and running commands on containers have been listed in the above sections. You can look at them for a quick walkthrough of Distrobox.
What is Distrobox?
Distrobox is a software that enhances the compatibility and flexibility of Linux distributions within your terminal. It allows users to run various Linux distributions inside containers for easier integration and usage.
How can I integrate Distrobox into my Linux system?
You can integrate Distrobox by running the following command from the container: distrobox-export.
Can I run graphical applications using Distrobox?
Yes, Distrobox allows you to run graphical apps within the container, making it really useful for users who need to work with GUI applications.
How can I customize my Distrobox environment?
You can customize your Distrobox environment by customizing configuration files and scripts within the container. This allows you to tailor the environment to your specific needs.
Is Distrobox compatible with popular Linux distributions like Ubuntu and OpenSUSE?
Yes, Distrobox is compatible with popular distributions like Ubuntu and OpenSUSE, making it a versatile tool for users across different operating systems.
Does Distrobox provide access to my home directory?
Yes, Distrobox allows you access to your home directory within the container, enabling you to work with files and data stored in your home directory.
Can I use Distrobox to run applications with root privileges?
Yes, Distrobox allows you to run applications with root privileges, giving you the necessary permissions to perform administrative tasks within the container.