How to Install VirtualBox Guest Additions in Ubuntu

VirtualBox Guest Additions are a collection of device drivers and system applications designed to achieve closer integration between the host and guest operating systems. They help to enhance the overall interactive performance and usability of guest systems.

Read Also: How to Install VirtualBox Guest Additions in CentOS

The VirtualBox Guest Additions offer the following features:’

  • Easy mouse pointer integration.
  • Easy way to share folders between the host and the guest.
  • Drag and drop feature allows copying or opening files, copy clipboard formats from the host to the guest or from the guest to the host.
  • Share clipboard (for copy and paste) of the guest operating system with your host operating system.
  • Better video support provides accelerated video performance.
  • Better Time synchronization between guest and host.
  • Standard host/guest communication channels.
  • Seamless Windows features allows you to run windows of your guest operating system seamlessly next to the windows of your host.

The VirtualBox Guest Additions should be installed inside a virtual machine after the guest operating system has been installed.

In this article, we will explain how to install VirtualBox Guest Additions on Ubuntu and Debian based distributions such Linux Mint.

How to Install VirtualBox Guest Additions in Ubuntu

1. First start by updating your Ubuntu guest operating system software packages using following command.

$ sudo apt update
$ sudo apt upgrade

2. Once upgrade completes, reboot your Ubuntu guest operating system to effect the recent upgrades and install required packages as follows.

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

3. Next, from the Virtual Machine menu bar, go to Devices => click on Insert Guest Additions CD image as shown in the screenshot. This helps to mount the Guest Additions ISO file inside your virtual machine.

Install Virtualbox Guest Additions

Install Virtualbox Guest Additions

4. Next, you will get a dialog window, prompting you to Run the installer to launch it.

Run VirtualBox Guest Additions

Run VirtualBox Guest Additions

5. A terminal window will be opened from which the actual installation of VirtualBox Guest Additions will be performed. Once the installation is complete, press [Enter] to close the installer terminal window. Then power off your Ubuntu guest OS to change some settings from VirtualBox manager as explained in the next step.

Install VirtualBox Guest Additions

Install VirtualBox Guest Additions

6. Now to enable Shared Clipboard and Drag’n’Drop functionality between Guest and Host Machine. Go to General => Advanced and enable the two options (Shared Clipboard and Drag’n’Drop) as you wish, from the drop down options. Then click OK to save the settings and boot your system, login and test if everything is working fine.

Enable Shared Clipboard in Virtualbox

Enable Shared Clipboard in Virtualbox

Congratulations! You have successfully installed VirtualBox Guest Additions on Ubuntu and Debian based distributions such Linux Mint.

Read Also: How to Enable USB in VirtualBox

If you face any problems during installation, use the feedback form below to ask any questions or share your thoughts about this article.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

37 Responses

  1. Zac says:

    Thanks for this, now the resolution fits my monitor :)

  2. Henry says:

    Hi,

    After doing this I can see the shared folder, but when running:

    ls -l /media/
    ls: cannot open directory  : Permission denied
    

    I am using Ubuntu guest VM.
    Thanks!

  3. Harlin Seritt says:

    Great job on the post, Aaron! This helped perfectly what I was trying to get done. Your articles are great!

  4. Eirkir says:

    Hey there! MUCH appreciated. The one thing I noticed with Xubuntu 18.04 is that I was not auto prompted to install any software.

    Just had to use the terminal to:

    $ sudo sh /media/%username%/VBox_GAs_6.0.0/VBoxLinuxAdditions.run
    
  5. Yousef says:

    Thank You this worked flawlessly

  6. SRV says:

    Hey Champs!!, whoever is having problem in their VM bootup process, please uncheck the button for “Enable 3D acceleration” under display setting!!
    Then it works like champ.

    Bye there!!!

  7. Yash Jain says:

    After inserting Guest Additions CD Image, no popup came and a new icon came. On clicking it, its internal folders and files are visible and i cannot run any of them.

  8. Ismail says:

    Thank you so much for this tutorial.

  9. albig says:

    Hello I tried to perform this and went clicking on Device tab “Insert Guest” I get the message “Unable to insert the virtual optical disc”

    I am using Ubuntu server

    Thanks

  10. fred says:

    $(uname-r) should have a space: $(uname -r)

Got something to say? Join the discussion.

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

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