Install VirtualBox Guest Additions on Ubuntu 20.04


In this guide I will be showing you the process for installing VirtualBox Guest Additions on Ubuntu 20.04. This will include the following

  • Installing packages required for building Guest Additions
  • Building and installing Guest Additions

Install Prerequisites

In order to build and install Guest Additions, you will require the following packages.

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

Install Guest Additions

Now, you will need to make sure that you have mounted the Guest Additions CD. This can be done from within VirtualBox by going to Devices -> Install Guest Additions CD image. If you have done this, great, you're done! If you did this previously and it is already mounted, you need to find out where it is mounted. Try checking these locations:

ls /media/$USER/VBox*
ls /media/cdrom*/VBox*

For me, this was mounted at /media/user/VBox_GAs_6.1.8/. Once you've found it, you can run it. Make sure to substitude in the appropriate directory but for most, this should work:

sudo /media/$USER/VBox*/

If you get the following error
sudo: unable to execute Permission denied then you will need to copy this to another folder and execute it from there.

cp /media/$USER/VBox*/ ~/
chmod +x ~/
sudo ~/

After installing, you can remove the file again and reboot

rm ~/

After a reboot, your VM should now have Guest Additions installed!