How to enable Windows Subsystem Linux on Windows 10


Lately I have been using more my Windows Desktop than my Linux laptop, this is due to my laptop starting to signs of failure, more specifically FAN failure.
For my personal development i decided to ditch the Windows install on my laptop and install Linux on a secondary SSD.
Time has passed and i barely boot back into the Windows install.
Unfortunately as my wife also uses my desktop and it is being mainly used to play games it's been decided to keep it running Windows for now at least.

Luckily Microsoft has been working a lot on the Linux kernel for windows and I wanted to try it out, with this we can run Linux machine under Windows pretty much like a normal virtual machine.
Microsoft also has a great documentation about how to install and run machines under WSL.
https://docs.microsoft.com/en-us/windows/wsl/install-win10
Worth to mention that i'm writing this from a Kali machine, as I want to learn a bit more about Ethical Hacking.Installation is pretty simple following the Microsoft link.
It's also worth mention that you NEED to enable the Virtualization capabilities of your CPU in bios or it will fail to run the machines.
Some machines can be installed from Windows Store and they are free.

I will also install windows terminal to so i can have shortcuts to login to the machine, cmd or powershell.

To see the machines that are running under WSL:

wsl -l
Windows Subsystem for Linux Distributions:
kali-linux (Default)

And to shutdown the machines after we left the session we do

wsl --terminate

If you have several machines running that you need to terminate use :

wsl --shutdown

This will shutdown all the machines running under WSL.