Welcome to my tutorial on how to install Kali Linux on Windows 11 with a GUI using the Windows Subsystem for Linux (WSL). Kali Linux is a popular operating system used by security professionals and enthusiasts for penetration testing and ethical hacking.
With the WSL feature on Windows 11, you can install and run a Linux environment without the need for a virtual machine or dual booting.
In this tutorial, I will guide you through the step-by-step process of installing Kali Linux using WSL and setting up the desktop environment for a graphical user interface. So, let’s get started!
Step 1: Enable Windows Subsystem for Linux
To get started, you’ll need to enable the Windows Subsystem for Linux on your Windows 11 computer. Here’s how:
Open the Windows Features settings by searching for “Turn Windows features on or off” in the Start menu. Or you can go to the “Control Panel” and then navigate to “Programs and Features”. On the sidebar, you can open Windows feature settings.
Scroll down to find “Virtual Machine Platform” and “Windows Subsystem for Linux,” then check the boxes.
Click the “OK” button, and it will enable the Windows Subsystem for Linux. After that, you have to restart your computer when prompted.
Step 2: Install Kali Linux from the Microsoft Store
Once the Windows Subsystem for Linux is enabled, you can install Kali Linux from the Microsoft Store app on your Windows 11 computer. Here’s how:
Open the Microsoft Store app on your Windows 11 computer. Then simply search for “Kali Linux” and select the Kali Linux app.
Click the “Get” button to install Kali Linux on your computer. This will take some time to install, depending on your internet connection. I will skip the installation part.
Sometimes you will get this error message during the installation.
WslRegistertionDistribution failed with Error: 0x80370102
You can download the Linux kernel update package from the above link. Then run this package; it will install the Linux kernel and resolve the error.
Step 3: Set WSL 2 as the Default Version
Next, you have to set Windows Subsystem for Linux Version 2 as the default version. Search for “Windows Power Shell” and run it as an administrator.
Then you have to enter this command. Ok, now WSL 2 is activated.
wsl --set-default-version 2
Step 4: Launch Kali Linux
With Kali Linux installed, you can launch the app to set it up for the first time. Here’s how:
Open the Start menu and find the Kali Linux app. Then run it as an administrator, and it will launch the app to set up Kali Linux for the first time. It will ask you to choose a username and password when prompted.
You can enter any username and password, then verify them. You can see that Kali Linux is now running on your machine. Let’s see how to set up the graphical user interface for this Kali Linux OS.
Step 5: Update Kali Linux
Now that Kali Linux is installed and launched, you’ll want to update it to the latest version before installing the GUI. You just need to run a few small commands. Just copy and paste them below.
First, run this command to update the package list.
sudo apt update
It asks you to enter the root password that you set. This will take some time to update all the packages.
Step 6: Install the Win-Kex Desktop Environment
To use Kali Linux with a graphical user interface, you’ll need to install the Win-Kex desktop environment. Win-KeX provides a Kali Desktop Experience for the Windows Subsystem for Linux with several features.
For that, you just have to enter this command, and it will begin the installation. Wait until it is finished.
sudo apt install -y kali-win-kex
Step 7: Launch the Win-Kex Desktop Environment
With the Win-Kex desktop environment installed, you can launch it in window mode, enhanced session mode, and seamless mode.
- Window Mode
- Enhanced Session Mode
- Seamless Mode
You can use any of them. I am going to run in seamless mode. You need to enter this command to run Kali Linux in seamless mode.
kex --sl -s
It will ask for some firewall permissions, but you can allow them safely. You can try other modes also check this article for more information.
Now it is running on your computer.
To enter the Kali Linux GUI, open the Kali Linux terminal using the app. Then type “kex” and enter. When you enter it for the first time, it asks you to enter a password. You can enter whatever you want.
Then ask if you want this to be set as the view-only password, so type “N” here; otherwise, you didn’t be able to use the Kali Linux GUI.
Congratulations! You’ve successfully installed Kali Linux on Windows 11 using the Windows Subsystem for Linux and set up the graphical user interface! With Kali Linux installed, you can now use it for penetration testing and ethical hacking on your Windows 11 computer.
If you have any issues regarding this tutorial, feel free to contact us through the Minex Tuts tech forum. Thanks for watching/ reading, and don’t forget to subscribe for more tutorials!