Install VirtualBox Guest Additions on Ubuntu Virtual Machine

VirtualBox Guest Additions needs to be installed once the Ubuntu VM is installed. The Guest Additions contain device drivers and applications that optimize the performance of the Ubuntu Virtual Machine.

Do the following steps to install VirtualBox guest additions on Ubuntu Virtual Machine.

  1. Install build-essential, dkms and linux-headers.
  2. Insert VirtualBox Guest Additions CD Image.
  3. Mount Guest Additions CD Image.
  4. Run guest additions installer.
  5. Restart the virtual machine.

First, install following three packages, build-essential, dkms and linux-headers with apt-get command:

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

Then, go to device menu and select "Insert Guest Additions CD Image".

Next, mount the Ubuntu guest additions CD Image:

sudo mount /dev/cdrom /mnt

Run the Linux guest additions installer:

cd /mnt
sudo ./

Finally, Reboot the Ubuntu system: