Skip to content

Instantly share code, notes, and snippets.

@warecrash
Last active August 29, 2024 18:37
Show Gist options
  • Save warecrash/f35d4f9a822c452b0c54bbdb47c0c9a5 to your computer and use it in GitHub Desktop.
Save warecrash/f35d4f9a822c452b0c54bbdb47c0c9a5 to your computer and use it in GitHub Desktop.
Convert Debian to Kali
apt update
apt -y install wget gnupg dirmngr
wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import
gpg --keyserver hkp://keys.gnupg.net --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6
echo "deb http://http.kali.org/kali kali-rolling main non-free contrib" >> /etc/apt/sources.list
gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -
apt update
apt -y upgrade
apt -y dist-upgrade
apt -y autoremove --purge
apt -y install kali-linux-everything
@jakuta-tech
Copy link

Mine had to be changed to;

apt -y install wget gnupg dirmngr

and

apt -y install kali-linux-everything

@warecrash
Copy link
Author

Mine had to be changed to;

apt -y install wget gnupg dirmngr

and

apt -y install kali-linux-everything

Fixed, thanks!

@jimmckeeth
Copy link

jimmckeeth commented Jul 15, 2020

Twice when running this I get an error during

apt -y upgrade

so need to run
apt --fix-broken install
apt -y upgrade

Not sure if the apt -y upgrade needs to be run first though.

Also, this list of Metapackages can be used instead of the kali-linux-everything option if you want a lighter weight option. The package kali-linux-arm is especially useful if installing on ARM like an Orange Pi Zero.

@dslusser
Copy link

Just in case it helps anyone else having troubles getting everything working, I had a bit more success adding kali-last-snapshot to the sources.list as well, before I installed kali-linux-everything.

echo "deb http://http.kali.org/kali kali-last-snapshot main non-free contrib" >> /etc/apt/sources.list

@devatnull
Copy link

gpg --keyserver keyserver.ubuntu.com --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6

@iamtutu
Copy link

iamtutu commented Feb 9, 2022

Debian 10 to Kali

sudo apt update
sudo apt -y install wget gnupg dirmngr
sudo wget -q -O - https://archive.kali.org/archive-key.asc | gpg --import
sudo gpg --keyserver keyserver.ubuntu.com --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6
sudo sh -c "echo 'deb http://http.kali.org/kali kali-rolling main non-free contrib' >> /etc/apt/sources.list"
sudo sh -c "echo 'deb http://http.kali.org/kali kali-last-snapshot main non-free contrib' >> /etc/apt/sources.list"
sudo gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -
sudo apt update
sudo apt -y upgrade
sudo apt -y dist-upgrade
sudo apt -y autoremove --purge
sudo apt -y install kali-linux-everything

@VoXaN24
Copy link

VoXaN24 commented Aug 27, 2022

image

The gnupg server seems down
( sudo gpg --keyserver keyserver.ubuntu.com --recv-key 44C6513A8E4FB3D30875F758ED444FF07D8D0BF6 ) Work

@haodeon
Copy link

haodeon commented Oct 2, 2022

I used the following steps on Debian 11 running on GCP

sudo curl https://archive.kali.org/archive-key.asc -o /etc/apt/trusted.gpg.d/kali-archive-key.asc
sudo sh -c "echo 'deb http://http.kali.org/kali kali-rolling main non-free contrib' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot
sudo apt-get autoremove --purge
sudo apt-get install kali-linux-headless
sudo apt clean

@Peter-developer01
Copy link

This is dangerous. Why not use Kali?

@VoXaN24
Copy link

VoXaN24 commented Mar 14, 2023

This is dangerous. Why not use Kali?

Sometimes you can't choose Kali directly, so it's the simple way to do it

@Sanxho666
Copy link

Script did not work first time around got this response from termux.
SmartSelect_20230419_005328_Samsung Notes

The command
"~# gpg --sign-key ED444FF07D8D0BF6"
allowed the script to run all the way through idk if any has had any luck a different way I'd be curious to know.

@phocean
Copy link

phocean commented Jun 10, 2023

This is dangerous. Why not use Kali?

It's not. I have done it for years. As Kali is based on Debian, but ahead of Debian stable or complementary to Debian testing, there cannot be any trouble.

@Peter-developer01
Copy link

This is dangerous. Why not use Kali?

It's not. I have done it for years. As Kali is based on Debian, but ahead of Debian stable or complementary to Debian testing, there cannot be any trouble.

Even if it are Linux, there can be dangerous.

@phocean
Copy link

phocean commented Jun 10, 2023

This is dangerous. Why not use Kali?

It's not. I have done it for years. As Kali is based on Debian, but ahead of Debian stable or complementary to Debian testing, there cannot be any trouble.

Even if it are Linux, there can be dangerous.

Explain and develop then.

This way, it's technically a standard APT upgrade process, as it has worked for more than a decade. So, in theory no danger, and in practice no danger (I have done such stuff dozen of times, not a single issue, and always possible to roll back with a bit of apt skills).

@TheMadTomato
Copy link

i can skip the last part of installing kali for everything right? like download the each tool i need manually.

@phocean
Copy link

phocean commented Aug 11, 2023

@TheMadTomato Sure. That's what I do and would recommend by the way : keep it slim with only useful stuff.

@syztem4our666
Copy link

syztem4our666 commented Feb 13, 2024

For me worked but need to do something more, need to add priority to kali repos cause was giving me unmet dependencies
> sudo nano /etc/apt/preferences.d/kali-preferences.pref

And inside file:

Package: *
Pin: release o=kali
Pin-Priority: 1000

Then worked perfectly !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment