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 liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

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.

55 thoughts on “How to Install VirtualBox Guest Additions in Ubuntu”

    • @Kevin,

      yes, just run the following commands to mount the Guest addition and run the installer from CLI.

      # mount /dev/cdrom /mnt 
      # cd /mnt 
      # ./ 
      # reboot
  1. Hello,

    It is okay if I create a fixed size for Ubuntu? other website ways you need to have the fixed size to boot it faster.

    My problem is I can’t boot up my Ubuntu 18.04 LTS version.



  2. I’m running ubuntu VirtualBox on a mac os x (Mojave) everything works fine but I can’t paste the content into the machine and I can’t copy from it and vice versa. I’ve installed and uninstalled guest additions like 5x and all my settings are set to bidirectional. I’m 10 seconds from giving up entirely because I can’t do this. PLEASE help.


    @doc-please delete my first comment I wasn’t thinking and accidentally signed it with my son’s name while I was talking to him

  3. I’m using Ubuntu 20.04 and Guest Additions with VirtualBox 6.0 on Windows 10. I can change the Ubuntu resolution (to any of around 12 or so options) and it looks great.

    However, it doesn’t stay set from session to session. I’ve tried various recommendations I’ve found online, but none work. What are the top 5 or so things to (re)check and/or try? I’m hoping it’s just a checkbox or something simple like that.

  4. Thank you, Sir! With your help, I was able to have a full screen on virtual box Linux Ubuntu on Windows 10.

  5. I think it would be a good idea to write the command correctly:

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

  6. When I try to click insert guest additions cd image, it says Unable to insert the virtual optical disk C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the machine Ubuntu 2020.

    Could not mount the media/drive ‘C:\Program Files\Oracle\VirtualBox/VBoxGuestAdditions.iso’ (VERR_PDM_MEDIA_LOCKED).

    • If you check your VirtualBox settings, under storage. There is already a VirtualBox guest additions ISO listed there, so the Device-> Insert will fail with that lock message. To solve this, ignore the Device-> Insert, and open your File Manager instead, then run the VirtualBox shell that installs the guest addition. Another option is to remove the ISO from the settings and start your ubuntu, then use the Device-> Insert.


Got something to say? Join the discussion.

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.