As I always forget how to do this in Ubuntu Desktop and Ubuntu Server, I wrote this brief tutorial to help me remember. It should work with any Debian based distribution.
Hopefully you will also find it useful.
- Update your APT database: sudo apt-get update
- Install the latest security updates: sudo apt-get upgrade
- Install required packages: sudo apt-get install build-essential module-assistant
- Configure your system for building kernel modules: sudo m-a prepare
- Click on Install Guest Additions… from the Devices menu
- Mount the virtual CD Rom: sudo mount /dev/cdrom /media/cdrom
- Change directory to the virtual CD Rom Drive: cd /media/cdrom
- Install Guest Editions: sudo ./VBoxLinuxAdditions.run
- Restart VM by entering: sudo reboot
- To check that Guest Editions are installed: lsmod | grep vboxguest