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.
Table of Contents
Installing VirtualBox Guest Additions on Ubuntu 20.04
Guest Additions Features
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.
Insert Guest Additions ISO
In order to install VirtualBox Guest Additions, 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
The 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;
sudo /media/$USER/VBox_GAs_6.0.14/VBoxLinuxAdditions.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 virtualbox-guest-additions-iso
package.
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 /usr/share/virtualbox/VBoxGuestAdditions.iso
.
To install it, you need to mount it.
sudo mount -o loop /usr/share/virtualbox/VBoxGuestAdditions.iso /media/
Next, run the installation.
sudo /media/VBoxLinuxAdditions.run
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.
Related Tutorials
Install VirtualBox Guest Additions on CentOS 8
Install VirtualBox Guest Additions on Debian 10 Buster
Install VirtualBox Guest Additions on Ubuntu 18.04
modprobe vboxguest failed ubuntu 20.04
Hi ajcg, at what point did you get the error with modprobe failing?
sudo apt install virtualbox-guest-x11
was all that I required
”VirtualBox Guest Additions: Running kernel modules will not be replaced until
the system is restarted”
I’m getting the above message after i tried method 3. Please help!
Hi Sujith,
Did you try to restart your vm?
Hi, I have installed following the method 1 an all looks like it works ok, but it still not working because I can’t use shared clipboard, shared folders and drag and drop options.
you need to enabled shared clipboard, e.g Devices > Shared Clipboard
Very good tutorial. It worked for Ubuntu 18.04 and 20.04.
Thanks.