Run the Kali-Linux GUI in WSL2 with only two lines of code
Microsoft has added graphics support to Windows WSL2 by adding a new graphical component called WSLg. The thing rocks but Linux can be fiddly for setting up what is essentially a remote desktop. It turns out that the Kali team created a single package that handles everything, kali-win-kex. Just install kali-win-kex and run it.
Video
Steps
Upgrade WSL to support GUI integration
Update your WSL to make sure WSLg
is installed and is on the latest version. This code
exists in themove-distribution.ps1
script
wsl --update
Install kali-win-kex
Option 1: Enable kali-win-kex and run the Kali GUI without any upgrades
From the Kali-Linux shell prompt
Option 2: Run updates, install all packages, enable kali-win-kex, run the Kali GUI
Install package kali-win-kex
and add remote desktop access to the Linux GUI with a single
updated component.
Update and upgrade kali-linux and install the kali-win-kex to support running the GUI in WSL. Bulk up this kali-linux with a bunch of other packages from kali-linux-large.
Launching the desktop
Launch the WSL2 Kali desktop from a Linux terminal window. It will run full screen on the current monitor. Execute _as you_ from a Linux command line to bring up the Linux GUI
kex --win -s
Launch the WSL2 Kali desktop from Windows to bring up the Linux GUI
wsl -d kali-linux kex --win -s
- Ref: https://www.kali.org/docs/wsl/win-kex/
- Ref: https://github.com/microsoft/wslg a long explanation for those that don't use kali-win-kex
Created
2022 06
Comments
Post a Comment