If you have installed Ubuntu 20.04 on VirtualBox, you realize that it is not in fullscreen. In this guide, you will learn how to install VirtualBox guest additions on Ubuntu 20.04. Apart from enabling the virtual machine to have a full screen view, guest additions offers many other 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 20.04
In order to install VirtualBox Guest Additions on Ubuntu 20.04, you need to have the Guest Additions ISO file. Guest Addition ISO file can be inserted into the VM in two ways;
- Insert Guest Additions ISO File Manually
- Install Guest Additions ISO Automatically from Ubuntu Repositories using APT package manager.
Insert Guest Additions ISO File Manually
To manually insert the VirtualBox Guest Additions ISO file on your Ubuntu 20.04 VM, navigate to Menu bar on your VM and click Devices > Insert Guest Additions CD image. Note that before you can insert the ISO file, you need to have at least one empty IDE controller.
However, before you can proceed with Guest Addition installation, you first need to install required build tools, the Linux kernel headers and the support modules, if not already installed.
Run the command below to verify if these requirements have already been installed.
sudo dpkg -l | grep -E "dkms|linux-headers-$(uname -r)|build-essential"
ii build-essential 12.8ubuntu1 amd64 Informational list of build-essential packages ii linux-headers-5.3.0-18-generic 5.3.0-18.19 amd64 Linux kernel headers for version 5.3.0 on 64 bit x86 SMP
ii means that the package is installed. As you can see from the output, dkms is not installed. If none if these packages is installed, you can simply use the APT package manager to install them.
sudo apt update -y sudo apt upgrade
sudo apt install dkms linux-headers-$(uname -r) build-essential
Once that is done, proceed to insert the Guest Additions ISO from the Menu bar > Devices.
This will launch a dialog box which prompts you to run or cancel the Guest Additions installer.
Click Run to launch the installation of Guest additions on Ubuntu 20.04. You will be prompted to enter your password to authenticate the installation.
Upon successful authentication, the Guest Addition installation will now run.
Once the Guest Additions are installed, the screen automatically resizes itself. Press Enter to close the installation screen.
You can as well restart your virtual machine to reload the Kernel modules.
Install Guest Additions Manually from Terminal
You can also install the Guest Additions from the terminal. When the Guest Addition ISO file is inserted, it is mounted on
/media/$USER/VBox_GAs_6.0.x. Where x is the build version of VirtualBox.
Therefore press cancel when the installer dialog box opens up.
Then navigate to the mount point of the guest additions and run the command below;
cd /media/$USER/VBox_GAs_6.0.14 sudo ./VBoxLinuxAdditions.run
or simply run;
Installing Guest Additions ISO from Ubuntu Repositories
It is also possible to install the Guest Additions ISO file from Ubuntu repos. Guest Additions ISO file is provided by the
sudo apt-cache policy virtualbox-guest-additions-iso
If it is available, simply run the command below to install it.
sudo apt install virtualbox-guest-additions-iso
When installed, the VirtualBox Guest Additions ISO is now available as
To install it, you need to mount it.
sudo mount -o loop /usr/share/virtualbox/VBoxGuestAdditions.iso /media/
Next, run the installation.
Once the installation is done, restart your system to reload kernel modules.
You should now be on full screen and can be able to enable shared clipboard, shared folders, drag and drop…
If upon system reboot the screen doesn’t auto-resize automatically, be sure to toggle (off/on, so to say)
View -> Auto-resize Guest Display on the VM menu bar to set right VM resolution.
That is all on our guide on how to install VirtualBox Guest Additions on Ubuntu 20.04.