How to Install VirtualBox Guest Additions on Debian

VirtualBox Guest Additions will help you get the most out of your Debian virtual machine. It gives you automatic resolution scaling, a shared clipboard between the host and VM, and drag and drop ability. The step by step instructions below will explain how to install VirtualBox Guest Additions on Debian Linux.

1. First, we’ll use the system’s package manager to refresh package repositories, then install the prerequisite packages. Execute the following commands in terminal.

$ sudo apt update
$ sudo apt install build-essential dkms

2. Next, insert the Guest Additions CD into the VM by clicking on Devices > Insert Guest Additions CD Image.

Inserting the VirtualBox Guest Additions CD image

3. You should see a notification pop up (shown below), asking if you’d like to run the software. We recommend clicking “cancel” and running the program manually, as we show in the following steps.

VirtualBox Guest Additions prompt asking if we want to run the installer

4. Make a new directory to which you can mount the Guest Additions CD. Then, mount the disc to that directory.

$ sudo mkdir -p /mnt/cdrom
$ sudo mount /dev/cdrom /mnt/cdrom

5. Finally, execute the Guest Additions install script.

$ sudo /mnt/cdrom/VBoxLinuxAdditions.run

Terminal output showing VirtualBox Guest Additions being installed

6. That’s all there is to it, but you’ll need to reboot the virtual machine before you can enjoy the new benefits.

$ sudo reboot

7. Don’t forget that some features need to be enabled before you can use them.

Enabling the shared clipboard in VirtualBox

Leave a Comment

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