In this quick & easy guide, you will learn how to install and setup VirtualBox in Linux. This guide is regardless of any particular Linux distribution so it is okay if you are using any one of them. Now, let’s get started.

Virtualbox is an application that allows your base host to run operating systems as virtual hosts. In this quick guide, I will show you, how to install and setup an OS with VirtualBox in Linux. We will configure and run a Linux distribution or maybe an Android OS.

Installing VirtualBox in Linux

Virtualbox comes included in your official repository. So you can directly use the installation command as per your Linux distribution to install it.

Ubuntu & Ubuntu-based
sudo apt-get install virtualbox
Fedora & RPM-based
sudo dfn install virtualbox

If you are having any problem with the command line installation, then you can try the package file as per your Linux distribution. Just follow the given below guide.

Installing VirtualBox with the package file

There are mainly two packages available. One is .deb another is .rpm. So just visit the pkgs.org and search there ‘VirtualBox’ then simply download the package file.

Download VirtualBox – pkgs.org

To install the downloaded VirtualBox package use the commands given below.

For Distributions using DEB packges : Ubuntu-Mint
sudo dpkg -i virtualbox-version.deb
For Distributions using DEB packges : Fedora, CentOS, REHL
sudo dnf localinstall virtualbox-version.rpm

Note: Don’t forget to replace the “VirtualBox-version” to the downloaded virtualbox file name.

Now just open up the menu and search for ‘VirtualBox’.

installed vitualbox

Setting up a virtual OS with VirtualBox in Linux

We first need to download the .iso file of the OS that we want to install as a virtual host. For this, you can simply search Google like: “Download ElementaryOS iso” if you want to install Elementary OS or maybe an Android OS. It depends on your choice.

After downloading the .iso file, open the VirtualBox and create a profile for the virtual host.

Click the “New” gear like icon.

installing virtual host

Fill in the virtual host details such as its name, type and version. Although these settings do not mean much. You can not go wrong with it. Then hit next and few more screens will come so simply keep on clicking next unit the Create button comes which will create the virtual host.

Setting up virtual host

Now we need to provide this virtual host the .iso file that we have already downloaded earlier. Simply select the host and click on settings

setting up iso file in virtual host

Now choose the .iso file by selecting Storage > empty under Controller: IDE, then choose the file by clicking on the Disk icon and save it.

Now just select the virtual host and click on the Start button and you will see a regular installer window, shown in the below screenshot.

Regular OS installation process

After finishing up the installation process, you can simply double click on the hostname “Elementary OS” in this case and the OS will start to boot up and you can use it as a program in your main host.

So this was it the installation and the set up of VirtualBox in Linux. I hope this helped you. Let me know your experience in the comment section below and don’t forget to subscribe to our Youtube channel.