Installing Kali Linux in Windows

Samik Dey
IoT Lab KIIT
Published in
6 min readDec 5, 2021

A beginner’s guide

Kali Linux is an open-source, Debian-based Linux distribution system intended for various information security tasks, such as Penetration Testing, Security Research, Computer Forensics, and Reverse Engineering.

Kali Linux is based on the Debian Testing branch. Most packages Kali uses are imported from the Debian repositories.

It was developed by Mati Aharoni and Devon Kearns of Offensive Security through the rewrite of Backtrack, their previous information security testing Linux distribution based on Knoppix.

How to Install Kali Linux as an app on Windows 10

Recently Kali Linux was released as an application in the Microsoft Store. Through the utilization of the Windows Subsystem for Linux (WSL) compatibility layer, it's now possible to install Kali in a Windows environment.

WSL is a feature in Windows 10 that enables users to run native Linux command-line tools, Bash, and other tools previously not available. The feature was designed primarily for developers, gives Windows 10 added versatility, and presents an alternative option to virtualization.

System Requirements for installation of Kali Linux on a System

Kali Linux is supported on amd64 (x86_64/64-Bit) and i386 (x86/32-Bit) platforms. The hardware requirements are minimal as listed in the section below, although better hardware will naturally provide better performance. We should be able to use Kali Linux on newer hardware with UEFI and older systems with BIOS.

  • A minimum of 20GB hard disk space for installation depending on the version, (Version 2020.2 requires at least 20GB.)
  • A minimum of 2GB RAM for processors with i386 and AMD64 architectures.
  • A bootable CD-DVD drive or a USB stick.
  • A minimum of an Intel Core i3 or an AMD E1 processor for good performance.

The recommended hardware specification for a smooth experience is:

  • 50 GB of hard disk space
  • At least 2.5 GB of RAM.

On the low end, we can set up Kali Linux as a basic Secure Shell (SSH) server with no desktop, using as little as 128 MB of RAM (512 MB recommended) and 2 GB of disk space.

Steps to install Kali Linux on Windows 10

Step 1: Search for PowerShell form the search box and run the application as administrator.

Step 2: Run the following command in PowerShell:

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

Step 3: Allow the computer to reboot to complete the operation.

Step 4: Search for Microsoft Store and launch the application.

Step 5: Search for Kali Linux and download the Kali Linux application of size 192 MB from the store.

After downloading launch the application.

Step 6: After launch, the installation process begins.

Step 7: After the installation process completes the system will ask you for a username and password.

You can provide any username but make sure that you enter your username in lowercase.

After entering your username provide the password.

Step 8: After providing username and password run the command:

cat/etc/issue

for verification of the environment.

Step 9: Now we need to locate the newly created Kali directory in our Windows system.

This directory is generally found at :

C:\Users\<Username>\AppData\Local\Packages

Copy the file path.

Step 10: For this process,

Open Windows Defender>>Virus and threat protection>>Exclusions>>add Exclusions>>select folder>>paste the file path

Add this directory as a security exception in Windows Defender.

Step 11: Run the following command:

cat /etc/os-release

This provides the version info and URL supports.

Step 12: Now run the following commands:

sudo apt update && sudo apt upgrade-y

It will provide the list of upgrades available and will upgrade the packages accordingly.

Step 13: Now begin installing packages as desired. Here we install the kali desktop xfce package.

For this process run the command:

sudo apt install kali-desktop-xfce -y

The package will start installing. This step is a bit time-consuming and depends on your internet speed.

Step 14: After this run the command:

sudo apt install xrdp -y

This will install the new packages available.

Step 15: Now run the command:

sudo service xrdp start

This will start the service to your setup from Linux servers through your internet connection.

To fetch your IP address enter the following command:

IP add

This command will reveal your IP address.

Step 16: Search for Remote Desktop Connection and open the application.

Step 17: Now type the IP address we got in the computer letterbox and click on connect.

A prompt appears with the message the identity of the remote computer cannot be verified. Do you want to continue? Click on yes.

Step 18: Now enter your username and password and click on ok.

Step 19: Now you get an active session in the Linux environment.

Step 20: To logout from the current session you can run the command:

sudo /etc/init.d/xrdp stop

Or you can directly log out by clicking on the icon on the top right corner of the Linux window.

System specifications used for this procedure:

Device: Lenovo IdeaPad Flex 5 14IIL05

Processor: Intel® Core™ i7–1065G7 CPU @1.30Ghz 1.50Ghz

Ram: 16 GB DDR3 ram @ 1600 MHz

Video Card: NVIDIA GeForce MX330

System type: 64-bit operating system,x64-based processor

Final Thoughts

Installing Kali Linux as an app in Windows allows for the utilization of many useful tools that were not available previously. By running Kali through WSL as opposed to inside a virtual environment it's also possible to experience performance gains in processor-reliant frameworks such as hashcat.

This boost in performance here (500%+) is notable and could prove useful under certain circumstances.

One of the drawbacks to running Kali via WSL vs. running it natively is that WSL does not support the use of raw sockets (A network socket that permits direct sending/receiving of IP packets without any protocol-specific transport layer formatting). The pros and cons of using Kali Linux in the WSL environment will become more clear over time, but for now, it represents an interesting alternative to what’s currently available.

Sources:

Microsoft, https://docs.microsoft.com/en-us/windows/wsl/faq
Kali Linux, https://www.kali.org/news/kali-linux-in-the-windows-app-store/

--

--