VirtualBox on Kali-Linux

Published on 2016-10-27 by Andrew Graham-Yooll

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

References