How To Install VirtualBox Guest Additions On Ubuntu 22.04 LTS

In this tutorial, we will install VirtualBox guest additions on Ubuntu 22.04 LTS. To improve the guest operating system performance Oracle bundles necessary drivers and software packages as guest additions.

To install the guest additions on Ubuntu 22.04 LTS please follow the steps:

Step 1: Install build-essential and kernel headers

First, we need to install the build-essentials and Linux kernel headers for the current kernel.

sudo apt update

sudo apt install -y build-essential linux-headers-$(uname -r)

After running these commands successfully we can reboot the machine to complete the installation.

sudo reboot

Step 2: Insert Guest Additions CD Image

To insert the guest additions CD image :

From the VirtualBox Device menu -> Click Insert guest additions CD

From the file menu select devices and click insert guest additions CD image

Step 3: Mount And Run Guest Additions Installer

Create a folder to mount the guest additions installation CD.

sudo mkdir -p /mnt/cdrom

Mount the CD using the below command.

sudo mount /dev/cdrom /mnt/cdrom

Next, we can run the installation software(VBoxLinuxAdditions.run) in the mount.

cd /mnt/cdrom
sudo ./VBoxLinuxAdditions.run

After the successful installation, restart the VM.

Conclusion

That’s all, hope you installed the VirtualBox guest addition on Ubuntu 22.04 LTS by following this tutorial.