Step-by-step guide to install, configure, and use WSL and WSLg.
Enable the following features in the Windows Feature app: - Windows Subsystem for Linux - Virtual Machine Platform
Open CMD as an administrator and type:
wsl --installRestart your computer to apply changes.
Go to the Microsoft Store and install: - Windows Subsystem for Linux - Your preferred Linux Distribution (e.g., Ubuntu, Kali Linux, Debian, Oracle, Arch, etc.)
Open the Linux app and complete the installation process for your chosen Linux distribution.
Restart your PC to finalize the setup.
Your WSL installation is now complete.
To update the WSL version:
wsl --updateTo get information about WSL, WSLg, and the kernel version:
wsl --versionTo get a list of all installed distributions:
wsl --listwsl --allwsl --runningwsl --quietwsl --verbosewsl --onlineTo set the default Linux distribution:
wsl --set-default <Distro>Open your Linux distribution and run:
sudo apt update && sudo apt upgradeInstall Win-KeX for GUI support:
sudo apt install kali-win-kexFollow the prompts to fill in the required information.
To start the GUI, type in the terminal:
kex--esm - Launch Win-KeX desktop in a dedicated window using Windows native RDP.--sl - Integrate Win-KeX into the Windows desktop seamlessly.--win - Launch Win-KeX desktop in a dedicated window.--start--start-client--wtstart--stop--status--kill--passwd--start-sound / --stop-sound--wslg-restore / --wslg-remove / --wslg-status--version--help--ip or -i--multiscreen or -m--sound or -s--nowgl or -n--norc or -r--wait or -w--verboseStart Win-KeX server in window mode and launch Win-KeX client with sound support:
kex -sStart Win-KeX in seamless mode and launch Win-KeX client with sound support:
kex --sl -sStart Win-KeX in Enhanced Session Mode with ARM workaround and launch Win-KeX client with sound support:
kex --esm -i -sStart Win-KeX server as root in window mode and launch Win-KeX client:
sudo kex