How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Introduction

VirtualBox Guest Additions is a set of different device drivers and software application packages that are usually exported with the Oracle Virtualbox tool. They need to install inside the Ubuntu virtual machine to change the better screen resolution and mouse integration. In addition, Virtualbox guest addition also improves the performance and usability of your operating system. The Virtualbox guest additions offer various key features in which mouse integration, shared folders, better display or screen resolution, seamless windows; shared clipboard, generic host/guest communication channels, automated logins, and time synchronization are included.How-to cover image

Why are we required to install Virtualbox guest additions on Ubuntu virtual machines? When you install the Ubuntu operating system on a Virtualbox, you cannot change the screen resolution or display. To resolve this issue, you can install VirtualBox guest additions on your Ubuntu 20.04 virtual machine.

In this article, we go through the installation of Virtualbox guest additions on the Ubuntu 20.04 LTS system.

Prerequisites

  • Ubuntu 20.04 LTS operating system should be installed or running on your VirtualBox.
  • You must have root or administrative privileges to install software packages.

Methods Use for the installation of Virtualbox guest additions on Ubuntu 20.04 distribution

We can install Virtualbox guest addition on Ubuntu 20.04 system by using the following two different methods:

  1. Install VirtualBox Guest Addition using the Command-line (Terminal)
  2. Install VirtualBox Guest Additions using the Graphical User Interface

Let us start to explain each method in detail!

Method 1:
Install VirtualBox Guest Addition using the Command-line (Terminal)

Most Linux users prefer to use the command-line application ‘Terminal’ to install software application packages. So, open the terminal window using the keyboard shortcut ‘Ctrl Alt + t’. To install Virtualbox guest additions on Ubuntu virtual machine via the terminal application, you need to perform the following steps:

Step 1: Install Virtualbox guest addition packages

To install the Virtualbox guest additions on Ubuntu 20.04 LTS system using the terminal, you will need to install the following packages from the Ubuntu official repository by executing the below-mentioned commands:

$ sudo add-apt-repository multiverse

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

For installing all required Virtualbox guest additions packages on your system, you may need to use some extra disk space. Therefore, press ‘Y’ and then hit ‘Enter’ to proceed further as follows:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Once all guest packages are installed on your system, the following notifications displays on the terminal screen:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Step 2: Reboot Ubuntu Virtual Machine

Now, type the following command to reboot the Ubuntu operating system, which is installed inside a Virtualbox:

$ sudo reboot

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Step 3: Verify the Virtualbox Guest additions installation

Confirm the installation of guest addition on the Ubuntu 20.04 system by executing the following command:

$ lsmod  | grep vbox

The following output should show on the terminal windows:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Method 2:
Install VirtualBox Guest Additions using the Graphical User Interface

If you want to install the Virtualbox guest additions using the Graphical user interface (GUI), following below-given steps:

Step 1: Insert Guest Additions CD image

You require a CD image to install guest additions on Ubuntu 20.04 system. Therefore, on the Virtualbox window, go into the ‘Devices’ tab located at the top of the Virtualbox menu and choose ‘Insert guest additions CD image’ which is also shown in the following screenshot:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Step 2: Run the Guest Additions Software

When you attach the guest addition CD image with your Ubuntu virtual machine, a prompt displays on your Ubuntu desktop that will ask you to run the automatic installation. Click on the ‘Run’ as follows:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

After that, the automatic installation starts in the terminal window as follows:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Before completing the whole installation, the Ubuntu VM screen will change into the full-screen resolution mode that represents the successful installation of the Virtualbox guest additions on your system.

Step 3: Reboot Ubuntu system

You may restart or reboot your system to complete the installation process. Therefore, restart your system.

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

When you restart the system, you will notice the Ubuntu 20.04 operating environment has been switched to the full display mode.

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Activate the Shared Clipboard Feature

The Virtualbox guest additions provides a bi-directional shared clipboard option that allows you to copy and paste the content between the Ubuntu virtual machine and host operating system.
To enable this feature on your system, access the menu option of your Ubuntu virtual machine. Move into the tab Devices → Shared Clipboard → Bidirectional as follows:

How to install VirtualBox guest additions on Ubuntu 20.04 Linux distribution

Conclusion

We demonstrated two different methods for installing the VirtualBox guest additions on Ubuntu 20.04 Focal Fossa Linux distribution. You can either install Virtualbox guest additions via the GUI method or install its packages using the command-line application. Both ways are simple and you can easily adapt them for guest additions installation. Furthermore, we explained how to enable the ‘Shared Clipboard -> bidirectional’ option on Ubuntu virtual machines. I hope you enjoyed all the above-mentioned details. Please give us your suggestions via the comments.

Was this article helpful?