Follow these steps to install the Guest Additions on your Debian virtual machine:
1. The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file and in the /etc/apt/sources.list.d directory. To update the local package index with the latest changes made in the repositories, type the following:
apt-get update and the install the latest security updates, over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updates). To upgrade your system, first update your package index as outlined above, and then type:
2. Install required packages:
apt-get install build-essential module-assistant;
3. Configure your system for building kernel modules by running
4. And run as root:
sh /media/cdrom/VBoxLinuxAdditions.run and follow the instructions on screen.