Kali on the Windows Subsystem for Linux

Kali on the Windows Subsystem for Linux - techfirex

Install the Windows Subsystem for Linux:

First, run PowerShell as the administrator by pressing Windows + X and clicking on "Windows PowerShell (Admin)."

Kali-on-the-Windows-Subsystem-for-Linux

Then enable this optional Windows feature by running the following command.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Once you press Enter, a loading bar will appear for a few seconds, then you will be prompted to restart the computer.
Press Y and Enter to reboot.
The system will immediately begin to restart.

Download the 'Kali Linux' Application:

Once your system has rebooted and you've logged back into your account, navigate to the Microsoft Store by searching for it in the Cortana search bar in the bottom-left corner of your screen.
Once there, search for "Kali Linux" or simply follow the link below to open the Kali page in the Microsoft Store.
From there, click "Get" to begin installing.

Kali-on-the-Windows-Subsystem-for-Linux

Launch Kali for the First Time:

Before you launch the "Kali Linux" app for the first time, I recommend clicking "Pin to Start" or, better yet, click the ellipsis (...) just to the right of it and then "Pin to Taskbar" to make it quick and simple to launch Kali in the future.
Once you've done that, click "Launch," and a shell will open and begin the final installation which can take a few minutes.
With that done, you'll be prompted to create a Unix username and password.
Congratulations, you're all set up and running a Kali Linux subsystem on your Windows machine! 

Kali-on-the-Windows-Subsystem-for-Linux

Don't forget to update it regularly just like any Linux system:
techfire@TUSHAR-MAKWANA:~$ sudo apt-get update
techfire@TUSHAR-MAKWANA:~$ sudo apt-get dist-upgrade
If hard drive space is a concern, then don't forget to clean up the apt directory:
techfire@TUSHAR-MAKWANA:~$ sudo apt-get clean

Add Windows Defender Exclusion:

Unfortunately, Windows Defender doesn't always like to play nice with the tools in the Kali repository.
Sometimes, it detects them as viruses and/or malware and blocks some portion of the program. 
To prevent these errors, it's a good idea to go ahead and add a Windows Defender exclusion for the Kali Linux folder.
First, find that folder by opening File Explorer and entering the following location in the address bar.
Don't forget to replace "yourusername" with your actual username!
C:\Users\yourusername\AppData\Local\Packages\
Now, open the Kali Linux folder which should look something like "KaliLinux.3785648547FFE_," and copy the folder location.

Kali-on-the-Windows-Subsystem-for-Linux

With that in hand, search for "Windows Defender Security Center" in the Cortana search bar at the bottom left of the screen.
Within the Security Center, click on "Virus & threat protection" represented by a shield on the menu to the left side of the screen.
Next, click on the cog in the bottom, then "Virus & threat protection settings," then scroll down to the bottom under Exclusions and click "Add or remove exclusions." Then press the plus icon beside "Add an exclusion," select "Folder," and then paste the Kali folder address in the top bar. 
Click "Select folder," and a popup will appear — click "Yes" to add the exclusion.

Kali-on-the-Windows-Subsystem-for-Linux

If you ever want to remove this exclusion, simply click on the down arrow beside the folder location, and click "Remove."

Install Penetration Testing Tools:

With the Windows Defender exclusion in place, you're ready to get started with your ethical hacking.
Not much comes preinstalled in this version, so install tools you wish to use from the Kali repository as you normally would with the apt-get command.

For example, to install Nmap:
techfire@TUSHAR-MAKWANA:~$ sudo apt-get update
techfire@TUSHAR-MAKWANA:~$ sudo apt-get install nmap