How to install Kali Linux on Windows (not dual-booting)
By: Philz Ace
Tags: Operating Systems, Windows 10, Ethical Hacking, Linux, DevOps

Photo by Nahel Abdul Hadi on Unsplash

Over the years Kali Linux ( a Linux distro ) has become a de facto operating system for Penetration testing and Hacking, although it is not nice as an everyday OS and it is a little bit complex for a beginner to Install and use. if you like the windows operating system but you will also like to learn ethical hacking and enjoy some of the Linux sweetness without leaving Windows OS, there were usually three ways:

Dual Booting

Having two separate laptops

Using a Virtual machine

But there’s another option: installing a Kali subsystem on your Windows computer as a convenient compromise.

Microsoft has introduced Windows subsystem for Linux, or WSL, which lets users run their favorite Linux distributions directly from Windows 10 without dual-booting or using a virtual machine. Thanks to the efforts of Offensive Security and the WSL team at Microsoft, Kali Linux is now the most recent addition to the Microsoft Store.

Those familiar with running Kali Linux on a VM understand the frustration of attempting to use Wi-Fi and wifi adaptors. which is what makes the Windows subsystem so nice — you have no such problems. You can also have the full performance capability of your PC. You will not need to partition it as You would when using a VM. Unlike dual boot, You won’t have to restart your PC when you want to make use of the Linux Os. It is as simple as opening a shell.

Limitations of Kali as a Windows Subsystem for Linux

While this is definitely a step in the right direction for Microsoft, it’s not quite there yet in terms of full functionality. Specifically, WSL does not support AF_PACKET, and that’s because Windows itself does not support it because of security restrictions. This means that you won’t be able to put a Wi-Fi adapter in promiscuous mode (or monitor mode), and tools that require raw sockets to function properly won’t work, such as Nmap.

without wasting any more time, let’s get to it

STEP 1: Install the Windows Subsystem for Linux

First, run PowerShell as the administrator by pressing Windows + X and clicking on “Windows PowerShell (Admin).” Then enable this optional Windows feature by running the following command.

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

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.

STEP2: Download the ‘Kali Linux’ Application

Once your system has rebooted navigate to the Microsoft Store Once there, search for “Kali Linux”. From there, click “Get” to begin installing.

You can as well install other Linux distro the same way (even Ubuntu)

Step 3: Launch Kali for the First Time

Simply click on the Launch button to launch Kali Linux for the First time

You will be prompted to input Your Unix username ( the username you will like to use for the OS ) and then a password (choose wisely ; i recommend you include signs and symbols )

You are done with that you will need to update your Linux Os (just in case ) as well as your distro, You can do it by running

sudo apt-get update

when it’s done loading Run

sudo apt-get dist-upgrade

If hard drive space is a concern, then don’t forget to clean up the apt directory.

sudo apt-get clean

Step 4: Add Windows Defender Exclusion

Windows will detect most of Kali repositories as Viruses ( for obvious reasons).To prevent these errors, it’s a good idea to go 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.54290C8133FEE_ey8k8hqnwqnmg_,” and copy the folder location.

With that in hand, search for “Windows Defender Security Center” in the Cortana search bar 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.

Click on “ Add an exclusion ” button, then click on the folder and then paste the Directory of the Kali Linux folder that You copied

Conclusion

Since you have excluded Kali Linux from Windows defender You can go ahead to install You favourite Linux repository and You are ready to start with your ethical hacking. Note that not much comes with the preinstalled version. so you will have to install the once you need using “apt-get” command, for example, let’s install Metasploit

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 Metasploit:

sudo apt-get install Metasploit-framework

Thanks for reading! If you have any questions on setting up or using your new Kali Linux subsystem on Windows 10, or on what tools you should be installing, ask away in the comments below.

Final Words

Thank you for reading my article. Here at my blog or medium I regularly write about backend development, digital marketing and content management system. To read my future posts simply join my publication or click ‘Follow’ Also feel free to connect with me via Twitter, Facebook, Instagram.

If you are interested in backend development (or you’re internet enthusiast) both (Mobile | Web | Desktop) videos subscribe to my Youtube channel, we will be posting a collection of help full tutorials and guides like this one for artisans.

If you enjoy this post, make sure to let us know and share it with your friends and subscribe to my growing channel.

Sharing is caring.