Hello Techies! In this blog, we will install Kali Linux on Windows as a sub-system so that we can use it with Windows using command line interface. Here I’m not talking about installing Kali Linux using Virtual box or VMware.

Installing Kali as subsystem will be helpful, as you can easily access it through CMD and can run debian tools mostly the hacking tools available on GitHub. Also, it will be consuming less RAM, Smooth experience and faster result. Running on Virtual box, it is like running entirely a different OS on one device and it will definitely affect the performance.

Before moving on to main setup, you will require to do these basic steps so that it you won’t get any errors.

  1. Login to your Microsoft App Store.
  2. Make sure you have Windows Updated.
  3. Turn Developer mode on. Open Setting -> Update and Security -> For developers and select “Developer mode“.
Developer mode
Screenshot on my device

So, after making sure that you followed above steps, lets get started with the setup.

Kali Linux Subsystem Setup:

1. Turn on Windows Subsystem for Linux

Open Control Panel -> Programs and Features and on the left side you will find “Turn Windows Feature on or off“. Click on it and a pop-up box will open. Scroll down, find option “Windows Subsystem for Linux” and tick it. Click on Ok to save changes.

WSL - Windows Subsystem for Linux
Screenshot on my device

2. Installing Kali Linux from Microsoft App Store

Open the Microsoft App Store and search for “Kali Linux” and install it. Once the installation finished, Launch it. This may take a few minutes to install Kali Linux.

Kali Linux  in Microsoft app store
Screenshot on my device

3. Setting up Username and Password.

Once the installation will be finished, it will ask you to enter “Username” and then “Password“. Make sure you remember it, as it will be required while running root commands.

WSL Kali Install
Screenshot on my device

4. Updating Kali Linux

Once the credentials are set, the next thing is to update it so that it will support all latest libraries and tools. Enter the command given below with sudo as you are not root user on Windows.

$ sudo apt-get update

Updating kali
Screenshot on my device

Once the list gets updated, type the command below to get upgrade your Kali Linux. It will take some time, so sit back and grab a coffee.

$ sudo apt-get upgrade

Upgrading Kali
Screenshot on my device

5. Installing Git Clone

Now, this command is the basic one as we most likely to download tools from GitHub. To clone the repository, you are required to install this first. Execute the command given below.

$ sudo apt-get install git -y

Git Install
Screenshot on my device

6. Installing Python

We have to install python on our subsystem. Yes, you might have installed it on Windows but this is entirely a separate system running on Linux, so we have to install it. Run the command given below.

$ sudo apt-get install python

installing python
Screenshot on my device

I would recommend you to install both, Python and Python3. To install Python3, Run the command given below.

$ sudo apt-get install python3

python3 install
Screenshot on my device

7. Installing GoLang

There are lots of tools I’m using from Github are based on Go. So, you should install GoLang on your subsystem. Run the command given below.

$ sudo apt-get install golang

golang install
Screenshot on my device

8 Installing Google Chrome

As I’ve already mentioned above that Kali Linux is entirely separate sub-system, we have to install the Chrome in debian. This is required because tools like “Aquatone” uses the Chrome interface. So make sure you download it.

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

install chrome
Screenshot on my device

Once it get downloaded, run the command given below to install all dependencies and fixes.

$ sudo apt-get install -f

Finally, run command below to install it.

$ sudo dpkg -i google-chrome-stable_current_amd64.deb

9. Microsoft Preview (Windows Terminal)

Microsoft have launched Windows Terminal called Preview to give totally new experience and features to its users. Preview is in beta stage right now, but I haven’t found any issue till now and using it smoothly. It gives extended controls to you like multiple tabs and different command interfaces under one main tab.

To install it, simply go to Microsift App Store and search for “Preview”. Install it and you can open it from start menu.(image here)

Preview Win Terminal
Screenshot on my device

You can click on down arrow to get drop down menu and can select Kali to open it. By default, the location will be different. Simply run command cd and you will be on main terminal.

Preview Kali
Screenshot on my device

You can find Kali Linux directories at this location given below.

C:\Users\NAME\AppData\Local\Packages\KaliLinux.54xxx_xxx\LocalState\rootfs (You can simply create shortcut to desktop and it will make your work easy).

So, this was the setup I’m currently running on my device. Keep adding more tools as you require and update your subsystem.