How to Install VirtualBox on CentOS 7

Install VirtualBox on CentOS 7

In this article, we will have explained the necessary steps to install and configure VirtualBox on CentOS 7. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

VirtualBox is an open-source hypervisor software that helps you create and run multiple guest operating systems (“virtual machines”) on a single hardware machine. Oracle VM VirtualBox lets you create one or more VMs on a single physical server. Virtual Machines are computers that use the hardware components of the host computer, each running its own operating system. VB supports the installation of MS Windows, Linux, BDS, and MS-DOS on the installed VMs.

Install VirtualBox on CentOS

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

Step 2. Install VirtualBox.

First, Install packages which are required for installation of VirtualBox:

Next, download the Oracle Linux repo file to /etc/yum.repos.d directory:

Now install VirtualBox typing following command:

Verify that your VirtualBox installation was successful, run the following command:

Step 3. Install VirtualBox extension on CentOS.

Before downloading the extension pack using the command below you should check the VirtualBox download page to see if a newer version is available:

Then, import the extension pack using the following command:

Step 4. Starting VirtualBox.

Now that VirtualBox is installed on your CentOS system you can start it either from the command line by typing virtualbox or by clicking on the VirtualBox icon (Applications -> System Tools -> Oracle VM VirtualBox.).

Congratulation, you have learned how to install and configure VirtualBox on CentOS 7. If you have any question, please leave a comment below.