How to install VirtualBox on CentOS 5/6/7

It may have been explained clearly in the official VirtualBox VirtualBox Linux Download on how to install VirtualBox on CentOS 5/6/7, but for some new CentOS users it may be confusing.

In this brief post, I will try to make it simpler and faster to install VirtualBox on CentOS 5/6/7 using yum utility. Let’s follow the instructions below!

Download virtualbox.repo

sudo mv virtualbox.repo /etc/yum.repos.d/

Install the VirtualBox

sudo yum install VirtualBox-5.0
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base:
 * extras:
 * updates:
Resolving Dependencies
--> Running transaction check
---> Package VirtualBox-5.0.x86_64 0:5.0.0_101573_el7-1 will be installed


  VirtualBox-5.0.x86_64 0:5.0.0_101573_el7-1                                                                                                                                   


Once VirtualBox is completely installed, you are ready to install and setup Vagrant.