Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Sunday, March 13, 2022

Installing Kali Linux on WSL1 (not recommended)

I found Kali linux is ready for WSL and it's easy to install. Following list is distribution list that can be installed from Microsoft Store.

PS C:\> wsl --status
Default Version: 1

Windows Subsystem for Linux was last updated on 11/15/2021
WSL automatic updates are on.

Kernel version: 5.10.60.1


PS C:\> wsl -l -o
The following is a list of valid distributions that can be installed.
Install using 'wsl --install -d '.

NAME            FRIENDLY NAME
Ubuntu          Ubuntu
Debian          Debian GNU/Linux
kali-linux      Kali Linux Rolling
openSUSE-42     openSUSE Leap 42
SLES-12         SUSE Linux Enterprise Server v12
Ubuntu-16.04    Ubuntu 16.04 LTS
Ubuntu-18.04    Ubuntu 18.04 LTS
Ubuntu-20.04    Ubuntu 20.04 LTS



If WSL has been installed already, just execute following command is fine.

wsl --install -d kali-linux
 

PS C:\> wsl --install -d kali-linux
Downloading: Kali Linux Rolling
Installing: Kali Linux Rolling
Kali Linux Rolling has been installed.
Launching Kali Linux Rolling...



Once it is installed new window is popping up and username and password would be required to input.



Next step is to install the latest versions of all the installed packages. Following 2 commands need to be executed.

sudo apt-get update
sudo apt-get upgrade

This time I got strange error like this.

tmlocal@local:/$ sudo apt-get update
[sudo] password for tmlocal:
Get:1 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease [30.6 kB]
Err:1 http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease
  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository 
Fetched 30.6 kB in 1s (21.3 kB/s)
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://linux3.yz.yamagata-u.ac.jp/pub/linux/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository 
W: Failed to fetch http://http.kali.org/kali/dists/kali-rolling/InRelease  The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository 
W: Some index files failed to download. They have been ignored, or old ones used instead.


Installing Kali Linux on WSL2

In the last post I installed Kali Linux on WSL1, but actually it was not recommended as WSL2 is better than WSL1 obviously. Here is compari...