Kali Linux APPS on Windows in 5min (WSLg)
Table of Contents
Introduction
This tutorial will guide you through the process of installing and using Kali Linux applications on Windows using WSL 2 and WSLg. By following these steps, you can seamlessly run Linux GUI apps on your Windows 11 desktop, enhancing your development and security capabilities.
Step 1: Check Requirements
Before you start, ensure that your system meets the following requirements:
- Windows 11 (WSLg is available only on this version)
- Virtualization enabled in BIOS
- Internet connection for downloading necessary components
Step 2: Enable Virtualization
To run WSL 2 effectively, you need to enable virtualization:
- Restart your computer and enter BIOS/UEFI settings (usually by pressing F2, Delete, or Esc).
- Look for an option labeled "Virtualization Technology" or similar.
- Enable this option and save changes.
- Exit BIOS and boot into Windows.
Step 3: Install WSL 2
Follow these steps to install WSL 2:
- Open PowerShell as an administrator.
- Run the command to enable the WSL feature:
wsl --install
- This command will install WSL and set WSL 2 as your default version.
- Restart your computer if prompted.
Step 4: Set Up Ubuntu
After installing WSL, set up an Ubuntu distribution:
- Open the Microsoft Store.
- Search for "Ubuntu" and select the version you want (e.g., Ubuntu 20.04).
- Click "Get" or "Install" to download and install Ubuntu.
- Once installed, launch Ubuntu from the Start menu.
- Follow the prompts to create a user account and set a password.
Step 5: Install WSLg
To enable GUI support for Linux applications:
- Ensure you have the latest updates installed for Windows.
- WSLg should be automatically included with your WSL installation, but confirm it by running:
wsl --update
- Restart WSL for changes to take effect:
wsl --shutdown
Step 6: Launch Your First Linux GUI App
To test if everything is working, launch a GUI app:
- Open your Ubuntu terminal.
- Install a simple GUI app, such as
gedit
, by running:sudo apt update sudo apt install gedit
- Launch the app:
gedit
- The gedit text editor should appear on your Windows desktop.
Step 7: Install Other Linux Distros
You can also install other Linux distributions:
- Open the Microsoft Store.
- Search for your desired distribution (e.g., Kali Linux).
- Install it similar to how you installed Ubuntu.
- Set it up by launching the terminal and following the prompts.
Step 8: Install Kali Linux
To install Kali Linux specifically:
- Follow the same steps as with other distributions in the Microsoft Store.
- Once installed, launch Kali and set up your user account.
Step 9: Set Up Win-Kex for Kali
Win-Kex allows you to run Kali Linux GUI apps on Windows:
- Open your Kali terminal.
- Install Win-Kex by running:
sudo apt install -y kali-win-kex
- Start Win-Kex with:
kex
- A new window will open, allowing you to use Kali Linux GUI applications.
Conclusion
In this tutorial, you learned how to install and set up Kali Linux applications on Windows using WSL 2 and WSLg. By following these steps, you can effectively run Linux GUI applications alongside your Windows environment. For further exploration, consider experimenting with different Linux distros and applications to enhance your development experience.