Enable WSL on Windows 10
Open PowerShell as Administrator:
Type the following command to enable WSL 1:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Type the following command to enable WSL 2:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your computer.
After restarting, download and install the WSL 2 Linux kernel from Microsoft for your device architecture:
Finally, it is recommended to set WSL 2 as the default WSL environment.
Open PowerShell as Administrator as above and type the following command:
wsl.exe --set-default-version 2
Download Ubuntu for WSL from the Microsoft Store.
Run Ubuntu from the Start Menu.
Set up Ubuntu
Select a username and password for your administrative user.
Once complete, it is recommended you download and try the new Windows Terminal for the best Ubuntu on WSL experience.