How to Install VirtualBox Guest Additions in Ubuntu

Learn how to install VirtualBox guest additions in Ubuntu and other related Linux distributions and enable various features.2 min


A simple guide shows how to install VirtualBox guest additions in Ubuntu and other related Linux.

When you install Linux on a virtual machine, it is often named as the guest system. The host system is where you install the VirtualBox application.

Oracle’s VirtualBox provides a set of device drivers and apps that help achieve data and other communication between guest and host system. For example, if you want to share folders, drag and drop from host to guest. Here are some of the cool features of Guest Additions.

  • Share folders
  • Drag and drop feature
  • Bi-directional clipboard to achieve seamless cut/copy & paste
  • Better video performance

After you install VirtualBox in Ubuntu, you should definitely install Guest Additions. Here’s how.

Install VirtualBox Guest Additions in Ubuntu

These instructions assume that you have installed a guest Ubuntu system in VirtualBox.

  • Open VirtualBox in the host system and start Ubuntu virtual machine.
  • Open a terminal and install the following:
  • sudo apt install build-essential dkms linux-headers-$(uname -r)
  • After the above command is complete, restart the guest Ubuntu system.
  • After boot up is complete, go to the VirtualBox menu and select Devices > Insert Guest Additions CD Image. Here’s an example image for your reference (Figure 1).
  • Once you do that, you should see a new disk mounted under /run/media/[user name]/ directory. Go to that directory from the terminal.
  • Then, execute the setup program VBoxLinuxAdditions.run using the below command.
  • sudo ./VBoxLinuxAdditions.run
  • Wait for the instructions to finish. Once done, you should see the options available for Copy/Paste, folder share and others, as shown below (Figure 3).
Insert guest additions CD image in Ubuntu
Figure 1: Insert guest additions CD image in Ubuntu
Installing guest additions in Ubuntu
Figure 2: Installing guest additions in Ubuntu
Shared clipboard
Figure 3: Shared clipboard

Closing notes

In this tutorial, I have shown you how easily you can install guest additions in Ubuntu and other related distros. For Fedora, the instructions should be the same.

This article is tested in Ubuntu 23.10, although it should work just fine for other versions/distros.

Finally, let me know in the comment box if you face any errors while installing it.


Arindam

Creator and author of debugpoint.com. Connect with me via Telegram, 𝕏 (Twitter), or send us an email.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments