Home » repository » How to Install VirtualBox on CentOS 8 Linux

How to Install VirtualBox on CentOS 8 Linux

VirtualBox is an Open Source tool, known as a cross-platform virtualization application or software. It used to run multiple operating systems or virtual machines simultaneously on a single hardware.

In this VirtualBox installation tutorial, we will explain the process to install VirtualBox in CentOS 8 machine using two different methods. The first method describes the steps to install the latest version of VirtualBox from the CentOS repository. The second method will explain the steps to install VirtualBox from the Oracle repository.

The VirtualBox package is available in the CentOS repository, which may is not always the latest version of VirtualBox, as it updated on a time interval. However, if we want to install the latest version of VirtualBox, always use to Oracle repository.

The same instruction will apply to any other Red Hat-based distribution like Linux Mint and Elementary OS.


Before starting this tutorial, make sure you have CentOS 8 Linux installed and having user access with sudo privileges to execute administrative commands.

Installing VirtualBox from CentOS Repository

The VirtualBox installation using the CentOS repository is very straightforward like any other application; just run the following command to install VirtualBox on CentOS system:

$ sudo yum update
$ sudo yum install virtualbox virtualbox-ext-pack

Installing VirtualBox on CentOS using Oracle Repository

You can check the VirtualBox download page to get the latest version of VirtualBox available. It will help you to get the latest version of VirtualBox on your CentOS System.

You need to follow the following steps to install the latest version of VirtualBox from the Oracle repositories:

  • Step 1 – In the first step, we need to build tools for compaling vboxdrv kernel module to your CentOS system by using the following wget command:
$ sudo yum install kernel-devel kernel-devel-$(uname -r) kernel-headers kernel-headers-$(uname -r) make patch gcc

Step 2 – Now, downlod the oracle linux repository file to /etc/yum.repos.d/ directory using the wget command, as shown below:

$ sudo wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -P /etc/yum.repos.d

Step 3 – Once the VirtualBox’s Oracle repository gets enabled in your CentOS system. You can install VirtualBox like any other application after update the apt package list as shown below:

$ sudo apt update
$ sudo apt install virtualbox-6.0

Step 4 – You can verify VirtualBox installation by checking the status of vboxdrv service, as shown below:

$ systemctl status vboxdrv
● vboxdrv.service - VirtualBox Linux kernel module
    Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
    Active: active (exited) since Thu 2018-10-25 21:31:52 UTC; 6s ago

Installing VirtualBox Extension Pack

The VirtualBox Extension pack is use to enable several useful functionalities for a guest operating system or virtual machines such as USB device support, RDP support, and many more.

You can download VirtualBox Extension pack files by using the following command:

$ wget https://download.virtualbox.org/virtualbox/6.0.0/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack

You only make sure to match the version of the extension pack with installed VirtualBox.

After completion of the extension pack file download, need to import the extension pack using the following command:

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

Your screen will be prompted with Oracle license with accepting their terms and condition, as shown below:

Do you agree to these license terms and conditions (y/n)?

You should type “y” and hit the Enter button; after completion of VirtualBox installation, your screen will give you the following output:

Successfully installed "Oracle VM VirtualBox Extension Pack".

Starting VirtualBox

There are two ways to start VirtualBox; one is to using command by typing the command “VirtualBox.” Another one is to click on the VirtualBox icon using GUI, which appears in the Applications -> System Tools -> Oracle Vm VirtualBox.

When you start VirtualBox first time in your CentOS system, you will get the output screen similar to the below one:


Using this tutorial article, you have learned to install VirtualBox on your CentOS 8 Linux machine using the CentOS repository and Oracle VirtualBox repository. You can learn more about the VirtualBox using the official VirtualBox Documentation page.

If you have any issue in installing VirtualBox or having any feedback, please leave a comment below.

Related Posts

How to Install MongoDB on CentOS 8 Linux

How to Install MongoDB on CentOS 8 Linux

MongoDB is an open-source and free NoSQL document based database system. Nowadays, it is prevalent as most application developers are using MongoDB, which can handle big data. As a MongoDB is a NoSQL database, It stores data in JSON-like documents where fields can...

How to Install OpenCV on CentOS 8 Linux

How to Install OpenCV on CentOS 8 Linux

OpenCV (Open Source Computer Vision Library) is an open-source computer vision and machine learning software library. OpenCV was built to provide a common infrastructure for computer vision applications and to accelerate the use of machine perception in commercial...

How to install and use FFmpeg on CentOS 8 Linux Operating System

How to install and use FFmpeg on CentOS 8 Linux Operating System

The FFmpeg is the most potent and useful command-line tool on Linux system for multimedia files transcoding. You can use FFmpeg to convert multimedia files between various video and audio formats and resize videos. It has multiple audio and video libraries such as...

How to Install Python 3 on CentOS 8 Linux

How to Install Python 3 on CentOS 8 Linux

Python is one of the most popular and easy to code programming language nowadays, because of its simplicity and easy to code. It is now very popular among beginners and experienced computer programmers or developers. It is use to develop any kinds of...



Submit a Comment

Your email address will not be published. Required fields are marked *

one + seventeen =

Follow Us

Our Communities

More on CentOS

The Ultimate Managed Hosting Platform
Load WordPress Sites in as fast as 37ms!