How To Install VirtualBox 6.x on Ubuntu 18.04

How To Install VirtualBox 6.x on Ubuntu 18.04

VirtualBox is an open-source hypervisor software that allows you to create and run virtual machines such as Linux, Windows, OS/2, Solaris, and others on top of the host operating system. It is an alternative to VMware workstation and Kernel Virtual Machine.

VirtualBox can be installed on Linux, Windows, macOS, and Solaris. Oracle releases VirtualBox as a free software under GPL v2 and Oracle VM VirtualBox extension pack under PUEL which restricts the commercial usage.

Here, we will install VirtualBox 6.x on Ubuntu 18.04.

System Requirements

To run 64bit virtual machines, make sure your processor supports hardware virtualization, and VT is enabled in BIOS. Also, the host operating system must be 64bit as well.

Install VirtualBox

Import the GNU Public Key of the Oracle VirtualBox repository and add it to your system using the below command.

wget -q -O- | sudo apt-key add -

Add the VirtualBox repository on to your system.

echo "deb [arch=amd64] bionic contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Update the Ubuntu repository index.

sudo apt update

Install the VirtualBox using the apt command.

sudo apt install -y virtualbox-6.0

Check the vboxdrv status.

systemctl status vboxdrv
● vboxdrv.service - VirtualBox Linux kernel module Loaded: loaded (/usr/lib/virtualbox/; enabled; vendor preset: enabled) Active: active (exited) since Thu 2019-03-28 08:36:06 IST; 2s ago Process: 11989 ExecStop=/usr/lib/virtualbox/ stop (code=exited, status=0/SUCCESS) Process: 12018 ExecStart=/usr/lib/virtualbox/ start (code=exited, status=0/SUCCESS)

Mar 28 08:36:05 desktop.linuxbees.local systemd[1]: Starting VirtualBox Linux kernel module… Mar 28 08:36:05 desktop.linuxbees.local[12018]: Starting VirtualBox services. Mar 28 08:36:05 desktop.linuxbees.local[12023]: Starting VirtualBox services. Mar 28 08:36:06 desktop.linuxbees.local[12047]: VirtualBox services started. Mar 28 08:36:06 desktop.linuxbees.local systemd[1]: Started VirtualBox Linux kernel module.


Ubuntu with UEFI Secure Boot

On my system, the above vboxdrv kernel modules service didn’t start and got failed. Upon checking, I found UEFI caused the issue. So, I had to sign those modules by a key trusted by the UEFI system.

I suggest you perform the steps mentioned in the below link if you have UEFI enabled in BIOS before accessing the VirtualBox.

READ: VirtualBox + Secure Boot + Ubuntu = fail @ Øyvind Stegard

Access VirtualBox

Command Line Mode



Graphical Mode

Start VirtualBox 6.0 on Ubuntu 18.04

Activities » Search for Oracle VM VirtualBox.

VirtualBox 6.0 Running on Ubuntu 18.04:

VirtualBox 6.0 Running on Ubuntu 18.04

Install Oracle VM VirtualBox Extension Pack

Oracle offers extension pack to add additional functionalities such as USB 2.0/3.0, VirtualBox Remote Desktop Protocol (VRDP) support, Disk encryption, Host webcam passthrough, Intel PXE boot ROM, and PCI passthrough to the Oracle VM VirtualBox base installation.

cd /tmp

Check if any extension pack is already present on your system.

sudo VBoxManage list extpacks
Extension Packs: 0

Install the VirtualBox extension pack.

cd /tmp
sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack
. . .

. . .

exclusive jurisdiction of, and venue in, the courts of San Francisco or Santa Clara counties in California in any dispute arising out of or relating to this Agreement.

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

License accepted. For batch installaltion add –accept-license=56be48f923303c8cababb0bb4c478284b688ed23f16d775d729b89a2e8e5f9eb to the VBoxManage command line.

0%…10%…20%…30%…40%…50%…60%…70%…80%…90%…100% Successfully installed “Oracle VM VirtualBox Extension Pack”.

Verify the installed extension pack with the following command.

sudo VBoxManage list extpacks
Extension Packs: 1 Pack no. 0: Oracle VM VirtualBox Extension Pack Version: 6.0.4 Revision: 128413 Edition: Description: USB 2.0 and USB 3.0 Host Controller, Host Webcam, VirtualBox RDP, PXE ROM, Disk Encryption, NVMe. VRDE Module: VBoxVRDP Usable: true Why unusable:


You have successfully installed VirtualBox on Ubuntu 18.04. What are you waiting for? Go and play with it by creating virtual machines!.

comments powered by Disqus