Get Kali Repositories in Ubuntu

9th April 2019

To access the Kali PPA within Ubuntu, first add the kali repo to sources.list:

echo "deb kali-rolling main non-free contrib" >> sources.list"
apt update

This will throw an error when you attempt to update, likely whining about a key. Import it thusly:

sudo apt-key adv --keyserver --recv-keys ED444FF07D8D0BF6

Now we have the repo, we want to set its priority so that we will prefer Ubuntu packages, but install Kali packages if we don't have them already. For more details see and the more digestible

Add the following to /etc/apt/preferences (don't worry if you have to create it, you can worry about doing it properly in preferences.d later. Or never.):

Package: *
Pin: release o=Kali
Pin-Priority: 100

Please remember that, even with this, things may get a little prickly when installing a Kali package which shares dependencies with an Ubuntu package, especially if it's newer. Be mindful when installing stuff from the Internet!