Other useful situations that crossed our minds were standardizing tools and scripts to run across multiple environments, quick porting of Linux penetration testing command line tools to Windows, etc. One example that comes to mind is consolidation of workspaces, especially if Windows is your main working environment. While this setup of Kali on Windows is not optimal due to various environmental restrictions (such as the lack of raw sockets and lack of customised Kali kernel), there are still many situations where having Kali Linux alongside your Windows 10 machine can be beneficial. After all, if the WSL can support Ubuntu, it shouldn’t be too hard to incorporate another Debian-like distribution, right? This is especially true with the Windows Subsystem for Linux Distribution Switcher utility. We’re always on the prowl for novel environments to run Kali on, and with the introduction of the Windows Subsystem for Linux (WSL) in Windows 10, new and exciting possibilities have surfaced.
For a better way of getting Kali Linux on Windows 10, install Kali Linux from the App store. Let's break down some of the key commands to use in PowerShell that you'll need to know.Update : This post is outdated. You're able to set either as default as well as setting a version specifically to each Linux distro you have on your PC. This means you can run Linux installs with a combination of different versions. The good thing about WSL2 is that it doesn't replace WSL. Once the installer has done its thing, you'll now have WSL2 successfully installed on your PC.
If you have anything lower, you'll need to run Windows Update before going any further.Īssuming that's all good, the rest is straightforward.
There are also a couple of pre-requisites for using WSL2 on Windows 10. And that's why the installation differs a little from enabling regular old WSL. The latest iteration is essentially a tiny virtual machine that boots up in seconds and has a proper Linux kernel at its core. Now you have the Windows Subsystem for Linux enabled. Open PowerShell as administrator and enter this command: dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestartĮventually, you will need to reboot your PC, but you can leave it until later if you're going straight to installing WSL2.
We have a full guide on getting set up with the Windows Subsystem for Linux, which you should check out for a full primer on getting started, but if you're looking for the quickest route, there's a single line of code to enable it on your machine. There's no direct path to just installing WSL2. But to have the newest version, you first need to have the first. That may sound slightly strange, but the methods of enabling the first iteration and the second are quite different.
How to enable Windows Subsystem for Linuxīefore you can get WSL2, you need to have WSL. If you don't have the necessary version of Windows 10 installed to follow the simplified setup, the existing, much longer method still works. The setup process will begin and you can relax until it's finished. Once this is in place, open up PowerShell and enter this command: