The page I made so I'd stop Googling this every single time. Pick your distro, run the commands, reboot, done.
A small package of drivers and utilities that make your VM feel like a real computer instead of a potato running inside another computer.
sudo dnf update -y && sudo reboot
sudo dnf install -y gcc make perl kernel-headers kernel-devel dkms
/run/media/$USER/VBox_GAs_*# Replace YOUR_USERNAME with your actual username
cd /run/media/$USER/VBox_GAs_*/
sudo ./VBoxLinuxAdditions.run
sudo reboot
sudo dnf install -y virtualbox-guest-additionsAfter reboot, the VM window should auto-resize when you drag it. You can also confirm the services are running:
systemctl status vboxservice
sudo apt update && sudo apt upgrade -y sudo apt install -y build-essential dkms linux-headers-$(uname -r)
# CD usually automounts — navigate to it:
cd /media/$USER/VBox_GAs_*/
sudo ./VBoxLinuxAdditions.run
sudo mount /dev/cdrom /mnt && cd /mntsudo reboot
Window should auto-resize after reboot. To check services:
systemctl status vboxservice
sudo apt update && sudo apt upgrade -y sudo apt install -y build-essential dkms linux-headers-$(uname -r)
sudo mkdir -p /mnt/cdrom sudo mount /dev/cdrom /mnt/cdrom cd /mnt/cdrom sudo ./VBoxLinuxAdditions.run
apt install linux-headers-$(uname -r) and try again.sudo reboot
systemctl status vboxservice
sudo pacman -Syu
virtualbox-guest-utils-nox for headless/server setups.# For desktop systems (Gnome, KDE, etc.): sudo pacman -S virtualbox-guest-utils # For headless / server: sudo pacman -S virtualbox-guest-utils-nox
sudo systemctl enable --now vboxservice
sudo usermod -aG vboxsf $USER sudo reboot
pacman -Qs virtualbox-guest
sudo apt update
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
# Navigate to the mounted CD:
cd /media/$USER/VBox_GAs_*/
sudo ./VBoxLinuxAdditions.run
sudo reboot
systemctl status vboxservice
vboxservice is running with systemctl status vboxservice. If the service failed, the build likely didn't compile correctly — re-run the installer after confirming kernel headers match your running kernel (uname -r).uname -r to see your kernel version, then install the exact matching headers. On Fedora: sudo dnf install kernel-headers-$(uname -r) kernel-devel-$(uname -r). On Ubuntu/Debian/Mint: sudo apt install linux-headers-$(uname -r). Then re-run the installer.vboxclient --clipboard is running. You can add it to your desktop startup if it isn't launching automatically. On Fedora/GNOME this usually starts itself — if not, add it to your ~/.bash_profile.sudo ./VBoxLinuxAdditions.run again after updating. If you installed via your package manager (dnf/pacman), update the package too. DKMS should handle this automatically — but sometimes it doesn't. Run sudo dkms status to check.vboxsf group: sudo usermod -aG vboxsf $USER. Then log out and back in (or reboot) for the group change to take effect. Shared folders mount at /media/sf_foldername by default.