I am not sure how old is this feature available in Windows 10. Recently, I screened through Turn Window features on or off list again and found this. I got excited, and turn it on. I have to admit, this is the best solution for me as of now, which I cannot install Virtual Box on this laptop for whatever reason or policy. :P
I did a search on Google and found this page
Install WSL by Microsoft. But it says...
You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11. I checked my system, it is running at a lower version. :(
Well, do you think it would stop me from continue? Of course not! If you have it available in the list, of course it should be ready to use!
So I go ahead and enable it. Then, maybe I restarted laptop. In case you want to know how and where to enable it, follow these steps.
1. Open Control Panel
2. Click on "Programs"
3. Click on "Turn Window features on or off"
4. A dialog box pop up, scroll to the end. You'll see this.
5. Click to the checkbox besides Windows Subsystem for Linux
6. Then, maybe restart your system? (I can't recall if I did this or not)
Next, install.. I selected Ubuntu 20.04 LTS.
7. Launch Microsoft Store
8. Search for Linux
9. Click on the Linux distibution that you want to install.
10. Click on the Get button to download
11. Follow the instruction to install
Gaodim!
One thing that doesn't work with this WSL is on the network related command. Here I list the few commands I tried which do not work, even after I have installed the necessary package.
$ show ip route
$ nmap
$ hping3
For example the hping3 command, you'll get the open_sockraw permission error, even you run with sudo!
And best part is, you cannot reboot. :D Unless you restart your Windows. I forgot what triggered me to do the reboot...
You can run this from command prompt. Open a DOS command window, and type wsl. You will get the shell running on your DOS environment!
In case you forgot your password, try this in DOS command window.
wsl -u root
It works like magic!
That's all for my sharing today. If you observed the screenshot earlier, I enabled the Windows Sandbox as well. It is another nice, cool feature that I use for some naughty testing! I'll find time to share it next time.