How to Install VirtualBox Guest Additions on a Ubuntu VM

A Ubuntu virtual Machine running on Windows 10 host system

VirtualBox Guest Additions is software that can be installed on a guest operating system to give it additional functionality within VirtualBox. If you are running a Ubuntu virtual machine inside VirtualBox, you can follow along with the steps below to see how to get Guest Additions installed on the VM.

We are working with Ubuntu 20.04 Focal Fossa as our virtual machine in this guide; the host operating system does not matter.

VirtualBox Guest Additions

Installing VirtualBox Guest Additions onto your Ubuntu virtual machine will give you a lot of convenient features. To name a few:

  • Drag and drop files between host and guest operating system
  • Shared clipboard (copy + paste) between host and guest OS
  • Resize the virtual machine window and have the resolution scale accordingly
  • Mouse pointer integration

Those are some of the main features, but if you’re interested in learning about the other features it offers, you can check out the full list in the VirtualBox documentation.

Install VirtualBox Guest Additions on Ubuntu 20.04 Focal Fossa

We’re working with the latest version of Ubuntu Desktop, which is 20.04 Focal Fossa. However, these instructions should also work for other versions of Ubuntu. Here are the steps for installing VirtualBox Guest Additions:

1. Boot into your VM and open a new terminal window from the Activities menu or by pressing Ctrl + Alt + T on your keyboard.

Opening a new terminal in the Ubuntu VM

2. Next, we need to install three packages that the Guest Additions software relies on. Type the following command in your terminal:

sudo apt install gcc make perl

3. Once those packages finish installing, you can inset the Guest Additions CD image from the Devices menu.

Insert Guest Additions CD image from the Devices menu of VirtualBox

4. Ubuntu will detect that a disc has been inserted into the optical drive, and ask if you’d like to run the software on it. Click on “Run.”

Click the run dialog to start installing from the Guest Additions CD

5. A new terminal window will open up, and you should see some output about the VirtualBox Guest Additions being installed. Leave this window open while the software installs; it shouldn’t take more than a minute or two.

Guest Additions is installing, as you can see from the terminal output

6. You’ll know that the installation has completed when you see the text:

VirtualBox Guest Additions: Running kernel modules will not be replaced until the system is restarted
Press Return to close this window...

7. Like the output says, you need to restart your Ubuntu VM before the new changes will take effect. Restart your system and you’ll be able to use all the functionality of Guest Additions. Note that shared folders, drag and drop, and shared clipboard features are configurable under the Devices option.

Configure shared folders, drag and drop, and shared clipboard from the Devices menu

Leave a Reply

Your email address will not be published. Required fields are marked *