Install VirtualBox Guest Additions Ubuntu 16.04

In this tutorial we are going to learn how to install the VirtualBox guest additions on Ubuntu 16.04 Virtual Machine runs on Oracle VM VirtualBox. You can use the following method on Both Ubuntu Server and Desktop Operating Systems.

First, we need to install dependency packages which include dkms, build-essential and linux-headers Before we install Ubuntu VirtualBox guest additions . Then we mount the guest additions cd image on Ubuntu 16.04 and run the VBoxLinuxAdditions.run file. So let's see how it is done.

Step One

Install dkms, build-essential and linux-headers on Ubuntu 16.04

Open the Linux terminal and update the apt source list, then install dependency packages using apt-get install command.

sudo apt-get update

sudo apt-get install build-essential dkms linux-headers-$(uname -r)

Step Two

Insert VirtualBox Guest Additions CD Image

Now we need to insert the guest additions CD image to our Ubuntu virtual machine running on Oracle VM VirtualBox.

Insert VirtualBox Guest Additions CD Image

From the VirtualBox Devices menu, click on the Insert Guest Additions CD Image link as above image shows.

Step Three

Mount the Guest Additions CD Image

Using the Linux mount command, mount the Guest Additions CD Image to the /mnt directory.

sudo mount /dev/cdrom /mnt/

Step Four

Run the VBoxLinuxAdditions.run file

Fist moves into the /mnt directory using cd command.

cd /mnt/

Then run the Linux guest Additions installation file VBoxLinuxAdditions.run.

sudo ./VBoxLinuxAdditions.run

Install VirtualBox Guest Additions Ubuntu 16.04
Step Five

Restart the Ubuntu virtual Machine

Once the installation is finished, you need to restart your Ubuntu virtual machine. In Ubuntu 16.04 you can use systemctl reboot command from the command line to restart the system.

systemctl reboot

And that is how we install VirtualBox guest additions on Ubuntu 16.04.

Error - The headers for the current running kernel were not found

During the installation some users get the following warning message The headers for the current running kernel were not found. This error occurs because you haven’t installed the dependency packages on Ubuntu 16.04.

Install dkms, build-essential and linux-headers packages described in the step one and rerun the VBoxLinuxAdditions.run script to solve the problem.

Why Install Ubuntu Virtualbox Guest Additions ?

Virtualbox Guest Additions will greatly increase the performance of your Ubuntu Virtual Machine and also enable the some useful features like

  • Mouse pointer integration - Allow to Move mouse pointer between the host computer and the Ubuntu virtual machine.
  • Folder Sharing - Share Folders between the host and the virtual machine.
  • Shared Clipboard - Share clipboard between the host and virtual machine.
  • Seamless mode - Allow to run the Virtual Machine in the seamless mode.

Also the Ubuntu Virtualbox Guest Additions will correct the Screen resolution of your Ubuntu Desktop.

Summary : Install VirtualBox guest additions on Ubuntu

In this Tutorial We learned how to install virtualbox guest additions on Ubuntu 16.04.

  • First, we installed the dependency packages dkms, build-essential and linux-headers.
  • Then we mount the Guest Additions CD Image and execute the installation script VBoxLinuxAdditions.run.
submit to reddit