Win-KeX

Content:

Overview

Win-KeX provides a Kali Desktop Experience for Windows Subsystem for Linux (WSL 2) with the following features:

  • Window mode: start a Kali Linux desktop in a dedicated window
  • Seamless mode: share the Windows desktop between Windows and Kali apps and menus
  • Sound support
  • Unprivileged and Root session support
  • Shared clipboard for cut and paste support between Kali Linux and Windows apps
  • Multi-session support: root window & non-priv window & seamless sessions concurrently

win-kex-full

 

This page details the steps to install Win-Kex in under 2 minutes.

Installation

All installation steps, up to the point where we install Win-Kex, are also explained in the 5 minute video guide by the amazing NetworkChuck:

Kali Linux on Windows in 5min (WSL2 GUI)

Note: You can skip the installation of xrdp and follow the last step of this guide to install Win-Kex instead.

 

Prerequisites

Install Kali Linux in WSL2

  • Open PowerShell as administrator and run:

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

  • Open PowerShell as administrator and run:

    dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
    dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
    
  • Restart

  • Download and install the WSL2 Linux Kernel from here: https://aka.ms/wsl2kernel

  • Open PowerShell as administrator and run:
    wsl --set-default-version 2

  • Install Kali Linux from the Microsoft Store

Note: to upgrade an existing WSL1 kali-linux installation, type:
wsl --set-version kali-linux 2

  • Run Kali and finish the initial setup

Install Win-KeX

  • Install win-kex via:
    sudo apt update && sudo apt install kali-win-kex

Run Win-KeX

Win-KeX supports two modes:

 

  • Seamless mode:

    Win-Kex

    To start Win-KeX in Seamless mode with sound support, run

    win-kex --sl -s

    Refer to the Win-KeX SL usage documentation for further information.

 

Optional Steps:

  • If you have the space, why not install “Kali with the lot”?:
    sudo apt install kali-linux-large

Win-Kex with the Lot

 

Win-Kex in WTS

 

Choose amongst these options:

Basic Win-KeX in window mode with sound:

  {
        "guid": "{55ca431a-3a87-5fb3-83cd-11ececc031d2}",
        "hidden": false,
        "name": "Win-KeX",
        "commandline": "wsl kex --wtstart -s",
  },

Advanced Win-KeX in window mode with sound - Kali icon and start in kali home directory:

Copy the kali-menu.png icon across to your windows picture directory and add the icon and start directory to your WT config:

  {
          "guid": "{55ca431a-3a87-5fb3-83cd-11ececc031d2}",
          "hidden": false,
  		"icon": "file:///c:/users/<windows user>/pictures/icons/kali-menu.png",
          "name": "Win-KeX",
          "commandline": "wsl kex --wtstart -s",
  		"startingDirectory" : "//wsl$/kali-linux/home/<kali user>"
  },

 

Basic Win-KeX in seamless mode with sound:

  {
        "guid": "{55ca431a-3a87-5fb3-83cd-11ececc031d2}",
        "hidden": false,
        "name": "Win-KeX",
        "commandline": "wsl kex --sl --wtstart -s",
  },

 

Advanced Win-KeX in seamless mode with sound - Kali icon and start in kali home directory:

Copy the kali-menu.png icon across to your windows picture directory and add the icon and start directory to your WT config:

  {
          "guid": "{55ca431a-3a87-5fb3-83cd-11ececc031d2}",
          "hidden": false,
  		"icon": "file:///c:/users/<windows user>/pictures/icons/kali-menu.png",
          "name": "Win-KeX",
          "commandline": "wsl kex --sl --wtstart -s",
  		"startingDirectory" : "//wsl$/kali-linux/home/<kali user>"
  },

Win-Kex in WTS

Win-Kex in wts

Tip: If you are running different linux distributions in WSL, you can force to run win-kex in Kali by changing the command line to: "commandline": "wsl -d kali-linux kex wtstart",

win-kex-full

Help

For more information, ask for help via:

kex --help

or consult the manpage via:

man kex win-kex manpage

or join us in the Kali Forums

 

Enjoy Win-KeX!