-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWSL_Kali_Linux.ps1
46 lines (35 loc) · 1.99 KB
/
WSL_Kali_Linux.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Old question, but the top result when searching for ED444FF07D8D0BF6 here.
# Folks attempting to use Microsoft's instructions for installing Kali manually in Windows Subsystem for Linux (WSL or WSL2) will currently run
# into this issue. The Kali distribution linked on that page is 2019.2, so the signatures are already outdated as soon as it's installed.
# The other answers here look to be outdated at this point, referencing older keyring packages. At this time, the correct update
# package/process is:
wget https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb # If This download WON'T work, then
# manually go to this page [https://http.kali.org/kali/pool/main/k/kali-archive-keyring/kali-archive-keyring_2020.2_all.deb]and download it, and then install it using this command:
dpkg -i kali-archive-keyring_2022.1_all.deb
wsl -l -v
wsl -l -o
wsl --list
wsl --setdefault docker-desktop
# Delete a WSL image
wsl --unregister kali-linux
wsl --terminate kali-linux
wsl -d kali-linux
wsl --export kali-linux snapshot_18_May.tar
wsl --import kali-linux C:\Users\Hazem\Desktop\Cert .\snapshot.tar
wsl --import kali-linux C:/Users/Hazem/.wsl F:/WSL\ Snapshot/snapshot_18_May.tar
wsl --setdefault kali-linux/wsl -s kali-linux
wsl --list
# Install Every tool possible on Kali Linux
sudo apt install -y kali-linux-everything
# All packages of Kali Linux
https://www.kali.org/docs/general-use/metapackages/
wsl --set-default-version 2
wsl -u root passwd 123456
wsl --import kali-linux C:\Users\Hazem\Desktop\Cert .\snapshot.tar
# Force dpkg to reconfigure all the pending packages that are already unpacked but need to undergo configuration.
# The -a flag in the command stands for All.
sudo dpkg --configure -a
# Now, force the installation of the broken packages using the -f flag.
# APT will automatically search for broken packages on your system and reinstall them from the official repository.
sudo apt install -f
cat /etc/os-release