How to install VirtualBox on CentOS 8

VirtualBox is a free, cross-platform and open-source software used for virtualization. It allows users to run multiple virtual machines of different flavors simultaneously on a single PC. It is mainly used at the desktop level and supports various guest operating systems that include Linux and Windows. Virtualbox comes in handy for example when you are trying to explore features of different operating system distributions or develop software.

In this article you will learn how to install VirtualBox on CentOS 8.

Installation steps of VirtualBox on CentOS 8

The following steps are involved to install VirtualBox on CentOS 8.

  1. Open the terminal application on your system.
  2. Login as root user on your system. Or you will type ‘su’ command on the terminal window. Now, you have been logged in as an admin user.

Enable EPEL repository

Enable the EPEL repository of Oracle’s VirtualBox. To enable EPEL repository you will execute the following command on the terminal:

$ sudo dnf config-manager --add-repo=

Enable epel repository

Install VirtualBox 6.0

Now, you will install VirtualBox on your system using yum command. This tutorial about the installation of VirtualBox version 6.0. To install this version of VirtualBox on your CentOS 8.0, you need to run the below-mentioned command on the terminal:

$ sudo yum install VirtualBox-6.0

Install Virtualbox 6.0

During the installation process, a prompt will interrupt the Virtualbox installation that will ask from you either you want to complete the download necessary packages for Virtualbox or not you will press ‘y’ from your keyboard and then ‘Enter’ key to continue the installation. After a while, again a confirmation prompt would be displayed on the terminal that will confirm that you want to import the GPG key or not. You will press ‘y’ to continue the process.

Download packages

After performing the required actions, now Virtualbox has been installed on your CentOS 8.0.

Download VirtualBox  Extension Pack

It’s time to install an extension pack for Virtualbox. It has many useful functionalities in which virtual USB 2.0,3.0 devices support, disk image encryption, support for virtual RDP are included.

You can download the extension pack from the Virtualbox download page using ‘wget’ command. Run the below-mentioned command on the terminal to download the Virtualbox extension pack on CentOS 8.0.

$ wget

Download VirtualBox  Extension Pack
You can see in the above-mentioned output, Oracle’s Virtualbox Extension pack has been successfully saved into your CentOS 8.0 system.

  1. Install Extension Pack

Once the file download is completed, now you will install the downloaded file on your system. You will execute the following command to install Oracle’s Virtualbox Extension pack:

$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.14.vbox-extpack

Install Extension pack with VBoxManage command

During the installation, a license agreement will display on the terminal screen. You will press ‘y’ and then ‘Enter’ key to accept the terms and conditions related to Virtualbox.

The following output will display on the screen after successfully complete the installation of the Virtualbox Extension Pack.

Installation successful

Launch VirtualBox

Oracle’s Virtualbox Extension pack has been installed on your CentOS 8.0. Now, you will start or launch the Virtualbox on your system. You will type the following command on the terminal to start Virtualbox using a command-line environment.

$ virtualbox

When you will launch the first time Virtualbox on your system then the following window should display on your CentOS 8.0.

Launch VirtualBox

An alternate method is also available to launch Virtualbox on the system. You will click on ‘Activities’ from the desktop left corner and select show applications where you can view the Virtualbox icon on the desktop.

VirtualBox on Desktop

Now, you can create and run different work machines like Windows, Linux using Virtualbox on your system.


In this article, you have learned how to install Virtualbox on your CentOS 8 system. You have also learned how you can download and install necessary packages for Virtualbox. I hope this tutorial would be helpful for you in the future. Now, you are able to install and use Virtualbox on any Linux distribution of CentOS. In case of any queries please mention in the comment box.