What does it do? Looks into /etc/apt/sources.list, and ‘re-synchronize the package index files from their sources’.
Execute
apt-get upgrade
What does it do? Looks into /etc/apt/sources.list and grabs new versions of those listed packages.
Execute
apt-get dist-upgrade
What does it do? A more intelligent
apt-get upgrade
that will upgrade and remove package dependencies.1
Execute
apt-get install linux-headers-$(uname-r)
Go to the VirtualBox downloads page. Checkout the various versions. Every released version of VirtualBox will have various distribution packages for numerous OS’. As of writing this, I am using Kali Linux v. 2016-2. Therefore, I downloaded VirtualBox v. 5.1.12 and am able to run the wheezy codename on my machine. And you'll most likely want to install .amd64.2 If you are unsure, you will receive an error when going onto the next step. Execute