Config Server Firewall

How to Install VirtualBox Guest Additions on Ubuntu 24

In this article I will show you the correct way to install VirtualBox Guest Additions on a Ubuntu 24 Virtual machine.

Following are the steps you need to follow:

  1. Install dependencies (build-essential, DKMS, and Linux headers)
  2. Insert and mount the Guest Additions CD image
  3. Run the Guest Additions Linux installer

Install dependencies (build-essential, DKMS, and Linux headers)

First, install the following dependency package required for Guest Additions installation:

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

Insert and mount the Guest Additions CD image

After that, go to the Devices menu and click on the "Insert Guest Additions CD Image" option.

Insert Guest Additions CD Image

After inserting the CD image, mount it to the /mnt directory using the following command:

sudo mount /dev/cdrom /mnt

Run the Guest Additions Linux installer

Now install the guest additions, first cd into /mnt directory and then run the VBoxLinuxAdditions.run file.

cd /mnt/
sudo ./VBoxLinuxAdditions.run 

Once the installation is complete, restart the virtual machine. That’s it!

Install VirtualBox Guest Additions on Ubuntu 24

If you follow the above steps, Guest Additions will install without errors like This system is currently not set up to build kernel modules or The headers for the currently running kernel were not found.

VirtualBox Guest Additions will significantly improve the performance of your Ubuntu virtual machine and enable useful features such as:

Additionally, Ubuntu VirtualBox Guest Additions will automatically adjust the screen resolution of your Ubuntu desktop.