Here is comparison between WSL1 and WSL2.
And also I realized docker was not able to run on WSL1 linux. So I am re-installed Kali Linux on WSL2.
First WSL default version should be changed to version 2.
Just type this command is fine.
wsl --set-default-version 2
PS C:\Users\tmlocal> wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
To confirm the WSL version just typing this below command is OK.wsl --status
PS C:\Users\tmlocal> wsl --status
Default Version: 2
Windows Subsystem for Linux was last updated on 11/15/2021
WSL automatic updates are on.
Kernel version: 5.10.60.1
wsl --install -d kali-linux
In the new window Kali Linux starts running like this.
PS C:\Users\tmlocal> wsl --install -d kali-linux
Downloading: Kali Linux Rolling
Installing: Kali Linux Rolling
Kali Linux Rolling has been installed.
Launching Kali Linux Rolling...
In the new window Kali Linux starts running like this.
Installing, this may take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: tmlocal
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
Next step is to install the latest versions of all the installed packages. Following 2 commands need to be executed.