Javascript required
Skip to content Skip to sidebar Skip to footer

How to Install Virtualbox in Ubuntu 18.04

VirtualBox is an open-source hypervisor software; it allows you to create and run guest operating systems ("virtual machines") such as Linux and Windows on top of the existing operating system (host). VirtualBox may be installed on host operating systems, including Linux, Windows, Solaris, OS X, and OpenSolaris.

VirtualBox is released under GPL v2, and Oracle VM VirtualBox extension pack is released under PUEL (Personal Use and Evaluation License).

You can install VirtualBox either using precompiled binaries or source code. This tutorial focused on installing VirtualBox using precompiled binaries (.deb).

Starting from version 2.0, VirtualBox supports 32 and 64bit host and guest operating systems (To run 64bit guests, make sure your processor supports hardware virtualization and, the host operating system must be 64bit as well).

VirtualBox 6.0 does not support 32-bit hosts. So, to install VirtualBox on 32-bit Ubuntu hosts, you would need to go for the earlier version, which is VirtualBox 5.2.

Install VirtualBox on Ubuntu 18.04

Set up VirtualBox Repository

Kickstart a terminal to begin ( Ctrl + Alt + T ).

First, Import the Public Key of the Oracle VirtualBox repository to your system using the following command.

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Add a VirtualBox repository on to your system.

                      ### Ubuntu 18.04 ###                    echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list                      ### Ubuntu 18.10 ###                    echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian cosmic contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list                      ### Ubuntu 19.04 ###                    echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian disco contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list                      ### Ubuntu 16.04 ###                    echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib"  | sudo tee /etc/apt/sources.list.d/virtualbox.list

Update the Ubuntu package database.

sudo apt-get update

Install VirtualBox

Install the VirtualBox using the apt command.

VirtualBox 6.0

sudo apt-get -y install virtualbox-6.0

VirtualBox 5.2

sudo apt-get install virtualbox-5.2

Check the vboxdrv status.

systemctl status vboxdrv

Output:

                    vboxdrv.service - VirtualBox Linux kernel module    Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: enabled)    Active:          active (exited)          since Sun 2018-12-23 06:59:42 EST; 23min ago   Process: 1416 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)  Dec 23 06:59:42 desktop systemd[1]: Starting VirtualBox Linux kernel module... Dec 23 06:59:42 desktop vboxdrv.sh[1416]: vboxdrv.sh: Starting VirtualBox services. Dec 23 06:59:42 desktop vboxdrv.sh[1421]: Starting VirtualBox services. Dec 23 06:59:42 desktop vboxdrv.sh[1438]: VirtualBox services started. Dec 23 06:59:42 desktop systemd[1]: Started VirtualBox Linux kernel module.        

A Note for Ubuntu with UEFI Secure Boot fully enabled

The above vboxdrv kernel modules will fail if you have Ubuntu with UEFI. To fix the kernel modules issue, they must be signed by a key trusted by the UEFI system.

I recommend you to follow the steps mentioned in the below link before you access the VirtualBox.

READ: VirtualBox + Secure Boot + Ubuntu = fail

Access VirtualBox

Start the VirtualBox

Command Line Mode

virtualbox

OR

Graphical Mode

Ubuntu 18:04: Activities >> Search for Oracle VM VirtualBox.

Install VirtualBox on Ubuntu 18.04 - Start VirtualBox
Install VirtualBox on Ubuntu 18.04 – Start VirtualBox

Ubuntu 16.04: Dash >> Search for Oracle VM VirtualBox.

Install VirtualBox on Ubuntu 16.04 – Start VirtualBox
Install VirtualBox on Ubuntu 16.04 – Start VirtualBox

Why are you waiting for? just go and create virtual machines.

VirtualBox 6.0 Running VMs on Ubuntu 18.04:

Install VirtualBox 6.0 on Ubuntu 18.04 - VirtualBox Running LinuxMint 19 on Ubuntu 18.04
Install VirtualBox 6.0 on Ubuntu 18.04 – VirtualBox Running LinuxMint 19 on Ubuntu 18.04

VirtualBox 5.2 Running VMs on Ubuntu 18.04:

Install VirtualBox on Ubuntu 18.04 - VirtualBox Running Windows 10 on Ubuntu 18.04
Install VirtualBox on Ubuntu 18.04 – VirtualBox Running Windows 10 on Ubuntu 18.04

VirtualBox Running VMs on Ubuntu 16.04:

Install VirtualBox on Ubuntu 16.04 - VirtualBox Running Windows 24 on Ubuntu 16.04
Install VirtualBox on Ubuntu 16.04 – VirtualBox Running Windows 24 on Ubuntu 16.04

Install Oracle VM VirtualBox Extension Pack

Oracle offers an 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.

Follow the steps mentioned in the below link to install Oracle VM VirtualBox Extension Pack.

READ: How To Install Oracle VM VirtualBox Extension Pack on Ubuntu 18.04 & Ubuntu 16.04

Conclusion

That's All. Please share your feedback in the comments section.

How to Install Virtualbox in Ubuntu 18.04

Source: https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/install-virtualbox-4-5-ubuntu-16-04.html