VirtualBox is an open source cross-platform virtualization software, it can be installed on any operating system and enable you to install and run multiple guest operating systems on same computer. For example, if you install it on your Linux system, you can run Windows XP operating system under it as a Guest OS or run Linux OS on your Windows system and so on. This way, you can install and run as many as guest operating systems as you like, the only limit is disk space and memory.

Install VirtualBox 5.1 in Linux

Install VirtualBox 5.1 in Linux

Recently Oracle has released latest stable version of Virtualbox 5.1.0, the newest version of Virtual box comes with so many major changes and new features added to it.

Whats new in Virtualbox 5.1

  1. Paravirtualization Support for Linux and Windows Guests: Significantly improves performance of Linux guest operating systems by leveraging built-in virtualization support.
  2. Improved CPU Utilization: A set of CPU instructions to the guest OS, allowing application to use newest hardware instructions sets for better performance.
  3. Support of USB 3.0 Devices: Guest OS now supports USB 3.0 and can operate at maximum 3.0 speeds, also guest OS can be configured for USB 1.1, 2.0, and 3.0 support.
  4. Bi-Directional Drag and Drop Support: Guests can now support “drag and drop” (copying or opening files or directories) of content between host and guests on all host platforms.
  5. Disk Image Encryption: During run-time, Data can be transparently encrypted on virtual hard disk images with the support of 256 bit data encryption keys.

You can see the complete new change log details about VirtualBox 5.1 on their Official Changelog Page.

This guide explains how to install VirtualBox 5.1 on RHEL 7/6/5, CentOS 7/6/5 and Fedora 24-12 systems using VirtualBox’s own repository with YUM and DNF (for Fedora 23+ releases) tool.

This guide also explains how to install VirtualBox 5.1 on Debian 9/8/7/6, Ubuntu 16.04/15.10/15.04/14.10/14.04 and Linux Mint 18/17/16/15 systems using VirtualBox’s own repository with APT-GET command.

Installing VirtualBox 5.1 in RHEL/CentOS and Fedora

If you’ve any earlier version of Virtualbox installed, remove that before installing latest version.

# yum remove VirtualBox-4*

Adding VirtualBox Repository

Next add the VirtualBox own repository to install latest VirtualBox 5.1 on following systems.

For RHEL/CentOS 7/6/5
# cd /etc/yum.repos.d/
# wget
For RHEL/CentOS 5
# wget
# rpm -Uvh epel-release-5-4.noarch.rpm
For Fedora 24-12
# cd /etc/yum.repos.d/
# wget

Install Dependency Packages for VirtualBox

VirtualBox uses vboxdrv kernel module to control and allocate physical memory for execution of guest operating systems. Without this module, you can still use the VirtualBox to create and configure virtual machines, but they will not work. So, to make VirtualBox fully functional you will need to update your system first, then install some additional modules like DKMS, kernel-headers and kernel-devel and some dependency packages.

# yum update
# yum install binutils qt gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms

Install VirtualBox 5.1

Once you’ve installed all the needed dependency packages, you can install latest version of VirtualBox using following command.

# yum install VirtualBox-5.1

Rebuild Kernel Modules for VirtualBox 5.1

The below command will automatically create vboxusers group and user and also search and automatically rebuild required kernel modules. If the below build process fails, you will get a warning messages. Please have a look at /var/log/vbox-install.log to trace why the build process failed.

------------- Fedora 24-19 and CentOS/RHEL 7 ------------- /usr/lib/virtualbox/ setup
------------- Fedora 18-16 and CentOS/RHEL 6/5 ------------- /etc/init.d/vboxdrv setup
## OR ##
service vboxdrv setup

Next, replace user_name in the following command with your own user name.

# usermod -a -G vboxusers user_name


If you get any error message like KERN_DIR or if your kernel source directory not detected automatically by build process, you can set it by using following command. Make sure you change kernel version according to your system as shown in red color.

## RHEL / CentOS / Fedora ##
## Export KERN_DIR ##
export KERN_DIR

Installing VirtualBox 5.1 in Debian, Ubuntu and Linux Mint

First, uninstall any earlier version of Virtualbox if any.

$ sudo apt-get remove virtualbox-4*

Next, install latest 5.1 version using official Virtualbox repository. To add the repository, use the following command as shown.

$ sudo sh -c 'echo "deb $(lsb_release -cs) contrib" >> /etc/apt/sources.list.d/virtualbox.list'
$ wget -q -O- | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install virtualbox-5.1

Starting VirtualBox 5.1

Simply execute following command to start it from the terminal or use launcher from menu to start.

# VirtualBox
VirtualBox Screenshots on CentOS 7
VirtualBox 5.0 on CentOS 7

VirtualBox 5.0 on CentOS 7

Create New Guest OS

Create New Guest OS

Guest OS Settings

Guest OS Settings

VirtualBox Screenshots on Linux Mint 17
Virtualbox 4.3

Virtualbox 4.3 Preview

Virtualbox Video Capture

Virtualbox Video Capture Support

Virtualbox 4.3 Running VM's

Virtualbox 4.3 Running VM’s

Installing VirtualBox Extension Pack

If you need some additional functionality such as VirtualBox RDP, PXE, ROM with E1000 support and USB 2.0 Host Controller support, etc. You need to download and install the VirtualBox Extension Pack using following wget command.

# wget

To install the extension pack, you must have Virtualbox 5.1 installed, once you downloaded vbox-extpack open with Virtualbox as shown below. If it doesn’t work out, then open Virtaulbox –> Preferences –> Extensions and browse for the vbox-extpack to install it.

Install VirtualBox Extension Pack

Install VirtualBox Extension Pack

VirtualBox Extension Pack

VirtualBox Extension Pack

Updating VirtualBox

If you want to update the VirtualBox with latest version in the future, you can simply run the following command to update it.

On RHEL/CentOS/Fedora
# yum update VirtualBox-5.1
On Ubuntu/Linux Mint
# apt-get install VirtualBox-5.1

Remove VirtualBox

If in case you want to remove VirtualBox completely, just use the following command to remove it completely from your system.

On RHEL/CentOS/Fedora
# cd /etc/yum.repos.d/
# rm -rf virtualbox.repo
# yum remove VirtualBox-5.1
On Ubuntu/Linux Mint
# apt-get remove VirtualBox-5.1

You can also Download VirtualBox 5.1 for other Linux, Windows and Mac OS X platforms.

Facebook Comments
Spread the love

Posted by News Monkey