Skip to content

Instantly share code, notes, and snippets.

@danielcshn
Created August 22, 2022 02:27
Show Gist options
  • Save danielcshn/00f85bca15657c8d1d87aae74a30bc7b to your computer and use it in GitHub Desktop.
Save danielcshn/00f85bca15657c8d1d87aae74a30bc7b to your computer and use it in GitHub Desktop.
How to Install VirtualBox Guest Additions Ubuntu / Debian
  1. Login to the Ubuntu guest as a sudo user and install the packages required for building external kernel modules:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
  1. From the virtual machine menu, click Devices -> “Insert Guest Additions CD Image”
  2. Open the Ubuntu guest terminal, create a new directory as the mount point for the CD drive and mount the ISO file:
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
  1. Navigate to the directory and run the VBoxLinuxAdditions.run script to install the Guest Additions. The --nox11 option will tell the installer not to spawn an xterm window:
cd /mnt/cdrom
sudo sh ./VBoxLinuxAdditions.run --nox11
  1. Reboot the Ubuntu guest for changes to take effect:
sudo shutdown -r now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment