VirtualBox on Kali-Linux

A simple How-To on installing the latest version of VirtualBox on your Kali Linux OS

Posted by Andrew Graham-Yooll on December 27, 2016

Want to run a virtual machine within Kali Linux?

You can use VirtualBox easily on your setup.

Here is how to do it

  1. Execute
    apt-get update
    What does it do? Looks into /etc/apt/sources.list, and ‘re-synchronize the package index files from their sources’.
  2. Execute
    apt-get upgrade
    What does it do? Looks into /etc/apt/sources.list and grabs new versions of those listed packages.
  3. Execute
    apt-get dist-upgrade
    What does it do? A more intelligent
    apt-get upgrade
    that will upgrade and remove package dependencies.1
  4. Execute
    apt-get install linux-headers-$(uname -r)
  5. 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
    wget download.virtualbox.org/virtualbox/5.1.1/virtualbox-5.1_5.1.12-112440~Debian~wheezy_amd64.deb
  6. `cd` into the directory for the download that you just performed. If you `ls`, it will most likely be in the current working directory. Run
    dpkg -i virtualbox-5.1_5.1.12-112440~Debian~wheezy_amd64.deb` to install the package
  7. Important, execute
    reboot
    And that should be it!

References