Run Kali Linux on Windows 10

Kali Linux is a Debian-derived Linux distribution designed for digital forensics and penetration testing. Thanks to the Windows Subsystem for Linux (WSL), we can actually run Kali Linux in Windows, including a desktop environment (xfce4). Here’s how.

Enable Windows Subsystem for Linux

Skip this step if you have already setup Windows Subsystem for Linux.

If you have not already enabled Windows Subsystem for Linux, from an elevated PowerShell console.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

This will require a reboot.

Install Kali Linux from Windows Store

Launch the Microsoft Store app and search for Kali Linux and install it.

Launch Kali Linux

Once Kali Linux is installed from the Microsoft Store, open a Windows command prompt and type kali.

This will begin the setup of Kali Linux. It will ask for a Linux username to create and a password. Once completed, you’ll be at a command prompt in Kali.

Install xfce4 Desktop Environment

To install a desktop environment that will allow you to remote desktop into your Kali Linux system, a few packages need installed.  To make this easier, grab a script to install xfce4 desktop environment and all the necessary dependencies.


Set the script executable and then run it.

You looked at the code before executing it, right?  😉

rkreider@CTCRK-10:~$ cat
echo "[+] Installing XFCE4, this will take a while"
apt-get update
apt-get dist-upgrade -y --force-yes
apt-get --yes --force-yes install kali-desktop-xfce xorg xrdp
echo "[+] Configuring XRDP to listen on port 3390 (but not starting the service)..."
sed -i 's/port=3389/port=3390/g' /etc/xrdp/xrdp.ini

Looks ok, so I’ll set execute permission on the script and then run it. (This will take time!)

rkreider@CTCRK-10:~$ chmod +x
rkreider@CTCRK-10:~$ sudo ./

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

[sudo] password for rkreider:

When prompted, enter your password you created when initializing Kali Linux.

After a few minutes, you’ll be prompted to choose a Keyboard layout.  After that, it will continue with installation.

Connect with Remote Desktop

Start xrdp server once installation completes.  The script ( configured XRDP server to listen on port 3390.  To change the port, modify /etc/xrdp/xrdp.ini to your liking.

rkreider@CTCRK-10:~$ sudo /etc/init.d/xrdp start

Now back in Windows, launch Remote Desktop client and connect to

Supply your Kali Linux username and password, and login.

Happy pentesting.