Install VirtualBox Guest Additions on Ubuntu 18.04

|
Last Updated:
|
|

In this guide, we are going to learn how to install VirtualBox Guest Additions on Ubuntu 18.04 VM. Oracle VM VirtualBox Guest Additions provides a closer integration between host and guest thus improving the interactive performance of guest systems.

The Guest Additions offer the following features:

  • Mouse pointer integration
  • Shared folders for easy sharing of files between the host and the guest
  • Ensures better and accelerated video performance.
  • Seamless windows integration
  • Generic host/guest communication channels that enables you to control and manage guest execution.
  • Provides Host-Guest time synchronization.
  • Shared clipboard between host and guest vm.
  • Automated logins.

You can read more about these features on the VirtualBox User Manual.

Install VirtualBox Guest Additions on Ubuntu 18.04

VirtualBox Guest Additions are designed to be installed within the guest operating system. This guide demonstrates the installation of Guest Additions on Ubuntu 18.04 virtual machine.

Installing Guest Additions from Virtual Box Manager

Before you can proceed, you need to install some required packages such as Linux Kernel headers, dkms and build-essentials if they are not installed. You can verify the installation by running the command below;

sudo dpkg -l | grep -E "dkms|linux-headers-$(uname -r)|build-essential"
ii  build-essential                               12.1ubuntu2                                              amd64        Informational list of build-essential packages
ii  dkms                                          2.2.0.3-2ubuntu11.6                                      all          Dynamic Kernel Module Support Framework
ii  linux-headers-4.15.0-50-generic               4.15.0-50.54~16.04.1                                     amd64        Linux kernel headers for version 4.15.0 on 64 bit x86 SMP

The ii means that the package is installed.

If they are not installed, you can run the command below to do the installation.

apt update -y && apt upgrade
sudo apt install dkms linux-headers-$(uname -r) build-essential

Once the installation is done, Navigate to Devices > Insert Guest Additions CD image on the Menu bar.

This will launch a dialog box which prompts you to run or cancel the installer.

install VirtualBox Guest Additions on Ubuntu 18.04

Click Run to launch the installation of Guest additions on Ubuntu 18.04. You will be prompted to enter a password to authenticate the installation.

authenticate VirtualBox Guest Additions installation

Supply your password and authenticate. The installer then launches the shell and run the installation. Once the installation is done, press Enter to close the installation window.

VirtualBox Guest Additions installed

Next, restart your virtual machine in order to reload the kernel modules.

You can also install the Guest Additions from the terminal. To do this, press cancel when the installer dialog box opens up. The navigate to the mount point of the guest additions and run the command below;

cd /media/<user>/VBox_GAs_6.0.8
sudo ./VBoxLinuxAdditions.run

or simply run;

sudo /media/<user>/VBox_GAs_6.0.8/VBoxLinuxAdditions.run

You can now create shared folders as well as shared clipboards so that can you can be able to access your host files as well do copying in any direction you may want.

You can also install Guest Additions from repositories by running the command below;

apt install virtualbox-guest-additions-iso

The Guest Addition ISO will be installed under /usr/share/virtualbox/VBoxGuestAdditions.iso.

In this case, you need to mount the iso on the virtual machine as the CD and install it by navigating to the mount point and executing the installer script for Linux.

If you need to uninstall Guest Additions,

sudo /media/<user>/VBox_GAs_6.0.8/VBoxLinuxAdditions.run uninstall

Great.That is how to install VirtualBox Guest Additions on Ubuntu 18.04 VM. Want to learn how to install VirtualBox extension pack on VirtualBox 6.0? See the link below;

Install VirtualBox Extension Pack on VirtualBox 6.0

Other VirtualBox installation guides;

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
Jay Decrame
Linux Certified Engineer, Technology and Linux/Unix enthusiast.

Leave a Comment