Install VirtualBox Guest Additions in Ubuntu

1. Update your software

1
sudo apt-get update

2. Install the latest security updates

1
sudo apt-get upgrade

3. Install required packages

1
sudo apt-get install dkms build-essential linux-headers-generic linux-headers-$(uname -r) module-assistant

4. Install guest additions
Click on Install Guest Additions… from the Devices menu, then choose to browse the content of the CD when requested.
Run sudo sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen.