VirtualBox is a free and open source virtualization tools which allows techies to run multiple virtual machines of different flavor at the same time. It is generally used at desktop level (Linux and Windows), it becomes very handy when someone try to explore the features of new Linux distribution or want to install software like OpenStack, Ansible and Puppet in one VM, so in such scenarios one can launch a VM using VirtualBox.

VirtualBox is categorized as type 2 hypervisor which means it requires an existing operating system, on top of which VirtualBox software will be installed. VirtualBox provides features to create our own custom host only network and NAT network. In this article we will demonstrate how to install latest version of VirtualBox 6.0 on CentOS 8 and RHEL 8 System and will also demonstrate on how to install VirtualBox Extensions.

Installation steps of VirtualBox 6.0 on CentOS 8 / RHEL 8

Step:1) Enable VirtualBox and EPEL Repository

Login to your CentOS 8 or RHEL 8 system and open terminal and execute the following commands to enable VirtualBox and EPEL package repository.

[[email protected] ~]# dnf config-manager --add-repo=
Adding repo from:
[[email protected] ~]#

Use below rpm command to import Oracle VirtualBox Public Key

[[email protected] ~]# rpm --import

Enable EPEL repo using following dnf command,

[[email protected] ~]# dnf install -y

Step:2) Install VirtualBox Build tools and dependencies

Run the following command to install all VirtualBox build tools and dependencies,

[[email protected] ~]# dnf install binutils kernel-devel kernel-headers libgomp make patch gcc glibc-headers glibc-devel dkms -y

Once above decencies and build tools are installed successfully proceed with VirtualBox installation using dnf command,

Step:3) Install VirtualBox 6.0 on CentOS 8 / RHEL 8

If wish to list available versions of VirtualBox then execute the following dnf command,

[[email protected] ~]# dnf search virtualbox
Last metadata expiration check: 0:14:36 ago on Sun 17 Nov 2019 04:13:16 AM GMT.
=============== Summary & Name Matched: virtualbox =====================
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
[[email protected] ~]#

Let’s install latest version of VirtualBox 6.0 using following dnf command,

[[email protected] ~]# dnf install VirtualBox-6.0 -y

If any local user want to attach usb device to VirtualBox VMs then he/she should be part “vboxuser ” group, use the beneath usermod command to add local user to “vboxuser” group.

[[email protected] ~]# usermod -aG vboxusers pkumar

Step:4) Access VirtualBox on CentOS 8 / RHEL 8

There are two ways to access VirtualBox, from the command line type “virtualbox” command on then hit enter

[[email protected] ~]# virtualbox

From Desktop environment, Search “VirtualBox” from Search Dash.


Click on VirtualBox icon,


This confirms that VirtualBox 6.0 has been installed successfully, let’s install its extension pack.

Step:5) Install VirtualBox 6.0 Extension Pack

As the name suggests, VirtualBox extension pack is used to extend the functionality of VirtualBox. It adds the following features:

  • USB 2.0 & USB 3.0 support
  • Virtual RDP (VRDP)
  • Disk Image Encryption
  • Intel PXE Boot
  • Host WebCam

Use below wget command to download extension pack under download folder,

[[email protected] ~]$ cd Downloads/
[[email protected] Downloads]$ wget

Once it is downloaded, access VirtualBox and navigate File –>Preferences –> Extension then click on + icon to add downloaded extension pack,


Click on “Install” to start the installation of extension pack.


Click on “I Agree” to accept VirtualBox Extension Pack License.

After successful installation of VirtualBox extension pack, we will get following screen, Click on Ok and start using VirtualBox.


That’s all from this article, I hope these steps help you install VirtualBox 6.0 on your CentOS 8 and RHEL 8 system. Please do share your valuable feedback and comments.

from Linuxtechi