Table of Contents
VirtualBox guest additions are a collection of device drivers and software application packages shipped with Oracle VirtualBox. Installing Guest additions improve the guest operating system’s performance and extra features.
Guest Addition provides seamless mouse support, file transfer between the host and the VM, VM screen resolution will match the size of the VirtualBox window, automated guest login using credentials from a master login system, and many more.
In this post, we will see how to install VirtualBox guest additions on Ubuntu Desktop 22.04.
Install Guest Additions on Ubuntu 22.04
Install VirtualBox Guest Additions using Terminal
1. Open the Terminal app then refresh the repository and package lists, and perform the necessary upgrades with the following command:
sudo apt update -y && sudo apt upgrade -y
2. Before installing Guest additions, install the build tools and kernel headers for the current kernel.
sudo apt install -y build-essential linux-headers-$(uname -r)
3. VirtualBox guest additions are stored in an ISO file GuestAdditions.iso inside the VirtualBox installation directory. To install the Guest additions, you need to mount the ISO image into your VM.
Go to Devices > Insert Guest Additions CD Image on the VM window.
4. Mount the ISO image to the /media directory using below command:
sudo mount /dev/cdrom /media
5. Navigate tho the /media directory then execute the VirtualBox guest addition installer.
cd /media
sudo ./VBoxLinuxAdditions.run
Even before the installation gets complete, your system will get a full-screen view which confirms that the installation is successful.
6. Finally, you may reboot the system to complete the installation.
Install VirtualBox Guest Additions using GUI
Alternatively, if you don’t want to using Terminal, you can install the Guest Additions using GUI.
Before installing Guest additions using GUI, you must install the build tools and kernel headers for the current kernel. It’s mandatory.
sudo apt install -y build-essential linux-headers-$(uname -r)
1. Go to Devices > Insert Guest Additions CD Image.
2. As soon as you attach the guest additions image to a VM, you will get a prompt to run the automatic installation. If not, you can open File | VBox_GAs_6… | Right click on autorun.sh then select Run as a Program.
3. Next, you will get a window to enter a password to authorize the installation.
4. Finally, you may reboot the system to complete the installation.