Install VirtualBox Guest Additions on Ubuntu 20.04

|
Last Updated:
|
|

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.

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;

  1. Insert Guest Additions ISO File Manually
  2. 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.

run

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.

guest add installed

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…

Ubuntu 20.04 VirtualBox full screen

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.

Install VirtualBox Guest Additions on CentOS 8

Install VirtualBox Guest Additions on Debian 10 Buster

Install VirtualBox Guest Additions on Ubuntu 18.04

Install Ubuntu 20.04 on VirtualBox

Install Debian 10 Buster on VirtualBox

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
koromicha
I am the Co-founder of Kifarunix.com, Linux and the whole FOSS enthusiast, Linux System Admin and a Blue Teamer who loves to share technological tips and hacks with others as a way of sharing knowledge as: "In vain have you acquired knowledge if you have not imparted it to others".

8 thoughts on “Install VirtualBox Guest Additions on Ubuntu 20.04”

  1. ”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!

    Reply
  2. 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.

    Reply

Leave a Comment