TOOL » WINDOWS » WSL

Install

Enable Windows Subsystem for Linux

Open PowerShell and run the following command:

powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

For WSL 2, continue with:

powershell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Then install the Linux kernel package.

Finally set WSL 2 as default with:

shell
wsl --set-default-version 2

Managing WSL version

shell
wsl --list --verbose
wsl --set-version <distribution name> <versionNumber>

Manual Linux install

Download the Appx file from the Microsoft Store.

DistroLink
Ubuntu 18.04aka.ms/wsl-ubuntu-1804
Ubuntu 20.04aka.ms/wslubuntu2004

Then install it with PowerShell.

powershell
Add-AppxPackage .\Ubuntu.appx

The linux icon will appear on the menu. It may be necessary to restart your computer for WSL to work properly.