Unleash Kali Linux on Windows 10: The Ultimate WSL & GUI Guide (2023)
Ever wished you could run the world's most popular
penetration testing suite directly on your Windows 10 machine, without the
hassle of virtual machines or dual-booting? That dream is now a reality.
For security professionals, ethical hackers, and curious
tech enthusiasts, this is a game-changer. Thanks to the power of the Windows
Subsystem for Linux (WSL), you can now install and run a full-featured Kali
Linux environment seamlessly within Windows.
But we're not just stopping at the command line. This
comprehensive guide will walk you through the entire process:
- Enabling
the Windows Subsystem for Linux (WSL)
- Installing
Kali Linux from the Microsoft Store
- Configuring
a full XFCE Graphical Desktop Environment
Get ready to combine the convenience of Windows with the raw
power of Kali. Let's dive in.
Phase 1: Building the Foundation - Enabling WSL
Before we can install Kali, we need to enable the feature
that makes it all possible: the Windows Subsystem for Linux. WSL is a
compatibility layer that allows you to run Linux binary executables natively on
Windows.
Note: If you already have WSL enabled
on your system, you can skip straight to Phase 2.
- Open
PowerShell with Administrative Privileges.
- Right-click
on your Start Menu button.
- Select Windows
PowerShell (Admin).
- Click
"Yes" on the User Account Control prompt.
- Run
the Enablement Command.
Copy and paste the following command into your PowerShell window and press Enter. This command enables the necessary Windows optional feature.
PowerShell
# This command enables the Windows Subsystem for Linux
feature.
Enable-WindowsOptionalFeature -Online -FeatureName
Microsoft-Windows-Subsystem-Linux
- Reboot
Your System.
A system restart is required to complete the installation. Save any open work and restart your PC.
Phase 2: Installing the Beast - Getting Kali Linux
With WSL enabled, your Windows machine is ready to welcome
Kali Linux. The easiest way to get it is directly from the Microsoft Store.
- Navigate
to the Microsoft Store.
You can either search for "Kali Linux" in the Microsoft Store app or use this direct link: Kali Linux on Microsoft Store.
[Image: Screenshot of the Microsoft Store page for Kali
Linux with the "Get" button highlighted.]
- Install
the App.
Click the Get button (which may change to Install) to download and install the Kali Linux package. - Launch
Kali for the First Time.
Once installed, click the Launch button from the store. You can also find Kali Linux in your Start Menu or simply open PowerShell/CMD and type kali then press Enter.
The first launch will trigger a one-time installation
process that sets up the Kali file system. This can take several minutes, so be
patient.
[Image: Screenshot of the console window showing
"Installing, this may take a few minutes..."]
- Create
Your UNIX User Account.
After the installation finishes, you will be prompted to create a default UNIX user account. - Enter
a username.
- Enter
and confirm a password.
Important: This user account is
specific to your Kali environment. It does not need to match
your Windows credentials. Remember this password—you will need it to use sudo for
administrative commands.
Phase 3: The Full Experience - Setting Up the XFCE GUI
You now have a fully functional Kali Linux command-line
environment! To get the complete desktop experience, we'll install the
lightweight XFCE desktop environment and connect to it using Windows' built-in
Remote Desktop client.
Step 1: Update and Prepare Your System
First, let's update Kali's package lists and upgrade all
existing packages to their latest versions. This is a crucial first step for
stability and security.
# Update the package list and upgrade all installed packages
sudo apt update && sudo apt upgrade -y
Next, we'll install wget, a utility for downloading
files from the web, which we need to fetch our installation script.
# Install the wget utility
sudo apt-get install wget -y
Step 2: Download and Run the XFCE Install Script
The Kali team has provided a handy script to automate the
installation of XFCE and other necessary components.
- Download
the script using wget:
# Download the official XFCE setup script from Kali's
repository
wget https://kali.sh/xfce4.sh
- Execute
the script:
This is the longest part of the process. The script will download and install hundreds of packages.
Heads Up! During the installation, a
blue configuration screen will appear asking you to select your keyboard
layout. Use the arrow keys and Enter to make your selections.
# Make the script executable and run it with sudo privileges
chmod +x xfce4.sh
sudo ./xfce4.sh
Step 3: Start the Remote Desktop Server
To connect to our new GUI, we need to start the xrdp server.
This service listens for Remote Desktop Protocol (RDP) connections, the same
protocol used by the Windows Remote Desktop app.
# Start the xrdp service
sudo /etc/init.d/xrdp start
After running the command, take note of the port number it
is listening on. It is typically 3390.
[Image: Screenshot of the terminal output showing the
xrdp server starting and the listening port number.]
Phase 4: Connecting to Your New Kali Desktop
The hard part is over! Now, let's connect to the GUI.
- Open
the Remote Desktop Connection app on Windows (you can
find it by searching for mstsc in the Start Menu).
- In the
"Computer" field, enter localhost:3390 (or 127.0.0.1:3390)
and click Connect.
- You
will see the xrdp login screen.
- Session: Leave
as Xorg.
- username: Enter
the UNIX username you created in Phase 2.
- password: Enter
the password for that user.
- Click OK.
[Image: Screenshot of the xrdp login screen, with fields
for username and password.]
- That's
it! You should now be looking at a full Kali Linux XFCE desktop, running
seamlessly on your Windows 10 machine.
Conclusion & Best Practices
Congratulations! You have successfully installed Kali Linux
with a full graphical user interface on Windows 10. You now have a powerful
suite of security tools at your fingertips, perfectly integrated into your
primary OS.
Pro-Tip: Clean Shutdown
When you are finished with your graphical session, it's good practice to stop the xrdp service to free up resources. Simply run this command in your Kali terminal:
# Stop the xrdp service
sudo /etc/init.d/xrdp stop
Enjoy exploring the incredible potential of having the best
of both worlds
Comment here