Skip to content

Instantly share code, notes, and snippets.

@khiemdoan
Last active December 17, 2020 02:35
Show Gist options
  • Select an option

  • Save khiemdoan/aa00137eed876914d61eacbae161d78f to your computer and use it in GitHub Desktop.

Select an option

Save khiemdoan/aa00137eed876914d61eacbae161d78f to your computer and use it in GitHub Desktop.
How to Install WSL 2 on Windows 10
WSL 2 in CLI Mode:
winver (needs Windows 10 2004 or above)
Open> Turn Windows features on and off
Select>
- Virtual Machine Platform
- Windows Subsystem for Linux
Press> OK (system restart)
Open> Powershell> #wsl --set-default-version 2 (to set WSL2 as default)
Oepn> Microsoft Store
Search> Kali Linux App (Install)
Open> Kali Lniux App (configuration will start)
Set> username and password for Kali Linux when prompted
Download the latest package and install:
WSL2 Linux kernel update package for x64 machines
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
Open> Kali Linux (CLI) from Start Menu
Check> #wsl -l -v (WSL version)
Command> #sudo nano /etc/apt/source.list (to change source file details)
Change> deb http:// to deb https:// (save and close) (leave it if it's blank)
Command> #sudo apt-get update && sudo apt-get upgrade -y (to update and upgrade all the files)
WSL 2 in Desktop Mode:
Command> #sudo apt install -y kali-desktop-xfce (Kali's default desktop environment)
Select> Keyboard layout
Command> #sudo at install -y xrdp (for remote connection)
Command> #sudo service xrdp start
Command> #ip addr (copy local IP (eth0) (example: inet xxx.xx.xx.xxx/xx brd xxx.xx.xx.xxx scope global eth0)
Open> Remote Desktop connection
Paste> IP and connect.
Use> Kali Linux username and password to login
If there's any error like "dbus-launch"
Command> #sudo yum install dbus-x11
#sudo service dbus start (if required)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment