Install VirtualBox Guest Additions in Debian


When installing Debian or other Linux distributions as a guest in VirtualBox, you should install the guest additions for better integration. This allows shared clipboard, screen resizing, and more.


  • First, in the host machine, go to the VirtualBox menu: Devices -> Insert Guest Additions CD image.
  • Then, make sure the Linux kernel headers are installed for your version (apt install linux-headers-$(uname -r))
  • You'll also need to ensure you have compiler tools (apt install build-essential)
  • Run the script from the cd image as root. (bash /media/cdrom0/


# In VirtualBox, go to the menu 
# `Devices -> Insert Guest Additions CD image`

# Then in the terminal:

# Switch to root
sudo su -
mount # To confirm if CD image was mounted on /media/cdrom0
cd /media/cdrom0
apt install build-essential linux-headers-$(uname -r)

For more details, see this video: