How to install VirtualBox Guest Additions for Linux

VirtualBox Guest Additions are a set of device drivers and system applications which are designed to be installed in the guest operating systems of VirtualBox. Guest Additions are available as an ISO image for Windows, Linux, Solaris or OS/2. The Guest Additions offer a number of features including:

  • Seamless mouse support across host and guest operating systems.
  • Shared folders/clipboard between host and guest operating systems.
  • High-resolution video modes as well as hardware-accelerated performance for 3D graphics and 2D video.
  • Time synchronization between host and guest operating systems.

In this tutorial, I will describe how to install VirtualBox Guest Additions for Linux.

I assume that you already have a Linux guest virtual machine (VM) up and running on VirtualBox. The rest of the steps below should be done inside the Linux guest VM.

First, check out the version of your VirtualBox, and download the ISO image of
matching Guest Additions from For example, assuming that VirtualBox is 4.2.16, download Guest Additions for version 4.2.16.

$ wget

Next, install necessary packages:

On Ubuntu, Mint or Debian:

$ sudo apt-get install dkms gcc

On Fedora:

$ sudo yum install dkms gcc

On CentOS or RHEL:

$ sudo yum install kernel-devel gcc

Now, mount the ISO file for Guest Additions:

$ sudo mount -o loop VBoxGuestAdditions_4.2.16.iso /mnt
$ cd /mnt

Run the following executable in the mount point. This is the Guest Additions installer.

$ sudo ./

After the executable is completed, reboot the guest operating system to activate the updates.

To verify that Guest Additions are installed successfully, run the following. You should see several kernel modules loaded in the kernel.

$ lsmod | grep vbox
vboxvideo              12611  0
drm                   286313  1 vboxvideo
vboxsf                 39557  0
vboxguest             235614  2 vboxsf

Subscribe to Xmodulo

Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.

Support Xmodulo

Did you find this tutorial helpful? Then please be generous and support Xmodulo!

The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.

6 thoughts on “How to install VirtualBox Guest Additions for Linux

  1. Thanks for this! I've been having trouble implementing shared folders and the documentation isn't clear at all.

  2. You should find the Guest Additions is embedded within the VB image and so no further download is needed.
    From within the VM, you should be able to go to the menu bar of VB, choose the Devices menu, and from within that select 'Insert Guest Additions CD image' and then choose run.

  3. Hi guys, I am running a model on virtual machine but the problem is that I am unable to see all my results because I can't scroll up or down. Any suggestion as how I can correct this?

  4. Thanks you! I have been fighting with this all day. I tried to follow suggestions from other sites and still kept getting errors but yours was the most complete method and it worked! Thank you!

Leave a comment

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