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 126.96.36.199-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
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.
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.
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.
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;
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;
Other VirtualBox installation guides;
- Install Fedora 30 Workstation on VirtualBox
- How to Install IBM QRadar CE v7.3.1 on VirtualBox
- How to Upgrade VirtualBox 5.2 to VirtualBox 6.0 on Ubuntu 16.04
- How to Install FreeBSD 12 on VirtualBox
- How to Automate Virtual Machine Installation on VirtualBox
- How to install and configure AlienVault OSSIM 5.5 on VirtualBox
- How to Install OPNsense on VirtualBox
- How to Install IBM QRadar Community Edition SIEM on VirtualBox