This is a quick gist to install wsl2, download a disto and enable it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Enable hyper-v and wsl | |
| Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart | |
| Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux -NoRestart | |
| ## Download distro of choice (https://docs.microsoft.com/en-us/windows/wsl/install-manual) | |
| Invoke-WebRequest https://aka.ms/wsl-ubuntu-1804 -OutFile ubuntu-18-04.appx -UseBasicParsing | |
| Add-AppxPackage .\ubuntu-18-04.appx | |
| ## Second example (kali) | |
| Invoke-WebRequest https://aka.ms/wsl-kali-linux-new -OutFile kali.appx -UseBasicParsing | |
| Add-AppxPackage .\kali.appx | |
| kali.exe | |
| ## Check wsl distro list | |
| wsl -l -v |