Installing Kali Linux + GUI Directly on Windows 11: A Comprehensive Guide
Introduction
I used to think VMware or VirtualBox was cool until I stumbled upon Windows Subsystem for Linux (WSL) on Windows 11. WSL transforms your Windows machine, granting it access to a full suite of Linux distributions, including the powerful and versatile Kali Linux. This newfound capability opened up a realm of possibilities, enabling a seamless blend of the robustness of Linux with the user-friendly environment of Windows. So, I am saying goodbye to Kali on my VMware. This article aims to walk you through the process of installing Kali Linux directly on Windows 11, leveraging the power of WSL to create a harmonious operating environment right on your desktop.
Prerequisites
- A system running Windows 11.
- Basic understanding of Linux terminal commands.
- Familiarity with Windows Subsystem for Linux (WSL).
Getting Started
Enabling Windows Subsystem for Linux (WSL) on Windows 11:
- Open PowerShell as Administrator.
- Run the following command to enable the WSL feature as seen in figure below: “ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart “ as seen in image below.
- Enable the ‘Virtual Machine Platform’ feature by running the following command: “ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart “ .
- Run the command: “
wsl --install
“. - Once the command has completed, run:
wsl --update
to ensure everything is up to date as seen in image below.
- Set WSL default version to 2 by running the following command as seen in figure below: “ wsl — set-default-version 2 “
- Restart your computer to complete the installation.
Verifying WSL Installation:
- After restarting, you can verify the installation by checking the Windows features:
- Type “Turn Windows features on or off” in the Windows search bar.
- Scroll through the list to ensure that “Windows Subsystem for Linux” is checked as seen in figure below.
Installing Windows Terminal from the Microsoft Store:
- Download and install Windows Terminal from the Microsoft Store for a better terminal experience from this link here. [Just incase you don’t have it].
Installing Kali Linux
After installing WSL, we need to then install Kali on Windows:
- Download and install Kali Linux from the Microsoft Store from this link here.
- Launch Kali Linux from the Start menu and Kali will open in Windows Terminal.
- Upon the first launch, you will be prompted to create a non-root user and set a password. Follow the on-screen instructions to complete this step.
- Right after, Update Kali Linux with the command as seen in figure below: "
sudo apt update && sudo apt upgrade -y
“.
Introduction to Win-KeX:
Win-KeX provides a graphical user interface for Kali Linux on WSL, making it easier to navigate and use Kali Linux tools.
Installing Win-KeX for GUI Access:
- Command to install Win-KeX as seen in figure below: “ sudo apt install -y kali-win-kex “
Launching Win-KeX:
After installation is complete, start Win-keX in anyone of the different modes with command to launch them provided by Win-KeX:
- Window Mode: Starts a Kali Linux desktop in a dedicated window: “ kex — win -s “
- Enhanced Session Mode: Similar to Hyper-V, using RDP for a richer experience: “kex — esm — ip -s”
- Seamless Mode: Shares the Windows desktop between Windows and Kali applications and menus: “kex — sl -s”
Best commands to launch Win-KeX from my perspective:
One of the standout features of Win-KeX is its flexibility in terms of the modes it offers. Among these, my personal favorite is the “Enhanced Session Mode” which provides a rich user experience by utilizing RDP (Remote Desktop Protocol).
Here’s a breakdown of the command:
kex
: This is the command to launch Win-KeX.--esm
: This flag initiates the Enhanced Session Mode.--ip
: This flag is used to specify the IP address; however, in this command, it's used to enable the IP workaround for ARM devices.-s
: This flag enables sound support, which is essential for a complete user experience.
By running this command, you’ll open a new window with Kali Linux running, allowing for a seamless and interactive GUI experience. The Enhanced Session Mode is particularly impressive as it provides a rich, VM-like experience without the overhead of a traditional virtual machine.
Conclusion
Creating a good product indeed requires a thoughtful approach, and as illustrated in this guide, the developers behind WSL and Win-KeX have undoubtedly achieved this. Their creation bridges the gap between Windows and Linux environments, providing a streamlined and intuitive user experience. When you have a well-crafted product like this, marketing becomes very easy. The moment someone uses it, they immediately see its value, and word-of-mouth spreads quickly. As you explore Kali Linux on Windows 11 through WSL and Win-KeX, you are not only leveraging a powerful toolset but also becoming a part of the community that appreciates well-built, user-centric solutions. The ease of installation and the rich user experience of Kali Linux on Windows 11, powered by Win-KeX, embodies the essence of creating good products that require little to no marketing — the product speaks for itself, and its users become its biggest marketers.
Sources
Windows Subsystem for Linux Installation Guide for Windows 10: Microsoft Docs — Install WSL
Kali Linux on WSL: Microsoft Store — Kali Linux
Win-KeX (Windows + Kali Desktop EXperience): Official Kali Linux Documentation — Win-KeX
General Information on Kali Linux: Kali Linux Official Site
Windows Terminal: Microsoft Store — Windows Terminal
Kali Linux Community and Support: Kali Linux Forums