1
Update your system first
Always update before installing kernel-related packages. A mismatch between your running kernel and headers will cause the build to fail.
bash
sudo dnf update -y && sudo reboot
Actually reboot after updating. Skipping this is the #1 reason Guest Additions fails to compile on Fedora.
2
Install build tools and kernel headers
Guest Additions compiles kernel modules on the fly, so it needs your kernel headers and build tools.
bash
sudo dnf install -y gcc make perl kernel-headers kernel-devel dkms
3
Insert the Guest Additions CD image
In the VirtualBox window menu: Devices → Insert Guest Additions CD Image…
A dialog will pop up — click Cancel (don't let it autorun).
💡If the CD doesn't appear, it usually mounts automatically at /run/media/$USER/VBox_GAs_*
4
Run the installer
Navigate to the mounted CD and run the Linux installer script as root.
bash
# Replace YOUR_USERNAME with your actual username
cd /run/media/$USER/VBox_GAs_*/
sudo ./VBoxLinuxAdditions.run
This takes 2–4 minutes. You'll see it building kernel modules — that's normal.
5
Reboot
bash
sudo reboot
Alternatively: You can skip steps 3–5 entirely by installing from RPM Fusion instead:
sudo dnf install -y virtualbox-guest-additions
This is simpler but may lag behind the latest VirtualBox version.

// Verify it's working

After reboot, the VM window should auto-resize when you drag it. You can also confirm the services are running:

bash
systemctl status vboxservice
1
Update and install build dependencies
Ubuntu needs the same build tools as Fedora. One command handles it all.
bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
2
Insert the Guest Additions CD
In the VirtualBox menu: Devices → Insert Guest Additions CD Image…
Ubuntu may auto-open a file manager — close it and use the terminal instead.
3
Mount and run the installer
bash
# CD usually automounts — navigate to it:
cd /media/$USER/VBox_GAs_*/
sudo ./VBoxLinuxAdditions.run
💡If automount didn't work: sudo mount /dev/cdrom /mnt && cd /mnt
4
Reboot
bash
sudo reboot

// Verify it's working

Window should auto-resize after reboot. To check services:

bash
systemctl status vboxservice
1
Update and install dependencies
bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential dkms linux-headers-$(uname -r)
2
Insert Guest Additions CD
Devices → Insert Guest Additions CD Image… in the VirtualBox window.
3
Mount the CD manually (Debian often doesn't automount)
bash
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
sudo ./VBoxLinuxAdditions.run
Debian is the pickiest distro about kernel header versions. If the build fails, run apt install linux-headers-$(uname -r) and try again.
4
Reboot
bash
sudo reboot

// Verify it's working

bash
systemctl status vboxservice
🏹 Good news: Arch is actually the easiest. Install from the official repos — no CD image needed, no manual compilation.
1
Update your system
bash
sudo pacman -Syu
2
Install Guest Additions from official repos
For systems with a desktop (X11 or Wayland). Use virtualbox-guest-utils-nox for headless/server setups.
bash
# For desktop systems (Gnome, KDE, etc.):
sudo pacman -S virtualbox-guest-utils

# For headless / server:
sudo pacman -S virtualbox-guest-utils-nox
3
Enable and start the service
bash
sudo systemctl enable --now vboxservice
4
Add yourself to the vboxsf group (for shared folders)
bash
sudo usermod -aG vboxsf $USER
sudo reboot
Manjaro: Same commands, but Manjaro often ships with Guest Additions already installed. Check first with pacman -Qs virtualbox-guest
🌿 Linux Mint tip: Mint is Ubuntu/Debian-based, so the process is nearly identical to Ubuntu — but Mint often has a GUI shortcut worth trying first.
1
Try the GUI shortcut first
In the VirtualBox window: Devices → Insert Guest Additions CD Image…
Mint usually pops up an autorun dialog. If it does, click Run and follow the prompts — you're done.
💡If the autorun worked and the screen resizes after reboot, skip the rest. You're all set.
2
If autorun didn't work — install manually
bash
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
3
Reboot
bash
sudo reboot

// Verify it's working

bash
systemctl status vboxservice

Troubleshooting

Screen doesn't resize after reboot
First, make sure View → Auto-resize Guest Display is ticked in the VirtualBox menu. If it is, check that 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).
Installer says "kernel headers not found"
Your running kernel version and installed headers don't match. Run 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.
Shared clipboard isn't working
Two things to check: (1) In VirtualBox settings for the VM, go to General → Advanced and set Shared Clipboard to Bidirectional. (2) Make sure 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.
After a kernel update, Guest Additions stopped working
This is the most common ongoing issue. When your kernel updates, the Guest Additions modules need to be recompiled. If you installed via the CD script, just re-run 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.
Can't access shared folders (permission denied)
You need to add your user to the 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.