How To Install VirtualBox on Centos 7

In this article, we want to teach you How To Install VirtualBox on Centos 7.

VirtualBox is a general-purpose virtualization tool for x86 and x86-64 hardware, targeted at server, desktop, and embedded use.

It allows users and administrators to easily run multiple guest operating systems on a single host.

How To Install VirtualBox on Centos 7

Before you start to set up VirtualBox on Centos 7, you need to log in to your server as a non-root user with sudo privileges. To do this, you can follow the Initial Server Setup with Centos 7.

Now follow the steps below to install VirtualBox on your server.

Set up VirtualBox on Centos 7

Here you will install VirtualBox from the Oracle repository.

First, update your local package index with the following command:

sudo yum update

Then, you need to install the necessary tools with the command below:

sudo yum install kernel-devel kernel-devel-$(uname -r) kernel-headers kernel-headers-$(uname -r) make patch gcc

Now use the wget command to download the Oracle repository file:

sudo wget -P /etc/yum.repos.d

Next, you can visit the VirtualBox Downloads page to check the latest version of VirtualBox.

To install the latest VirtualBox version on your server, you can use the following command:

sudo yum install VirtualBox-6.1

Verify that your installation was successful you can use the following command:

systemctl status vboxdrv

In your output you will see:

● vboxdrv.service - VirtualBox Linux kernel module
Loaded: loaded (/usr/lib/virtualbox/; enabled; vendor preset: disabled)

The VirtualBox Extension Pack provides several useful functionalities for guest machines.

You can download the extension pack file with the following command, remember to replace the VirtualBox version that you have checked before:


After your download is completed, import the pack with the following command:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.30.vbox-extpack

You will be asked to accept the license terms and conditions press y and you will see the following output:

Successfully installed "Oracle VM VirtualBox Extension Pack".

Now let’s see how to start VirtualBox on Centos 7.

Start VirtualBox on Centos 7

To start the VirtualBox, you can type the VirtualBox from your command line.

Or from your Centos desktop you can choose Applications>System Tools> Oracle VM VirtualBox.

You will see:

Welcome to VirtualBox


When you started the VirtualBox for the first time, you will see the above image.


At this point, you learn to set up VirtualBox on Centos 7.

Hope you enjoy it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!