Edit this page
Open and issue
WSL2
The Windows 10 May 2020 update makes installing WSL2 much easier.
Turn on WSL feature and virtual machine platform¶
-
Open Windows PowerShell as administrator and run the commands:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
You will need to restart your computer.
Download the WSL2 update¶
- Prior to running WSL2 you will need to download and install the WSL2 kernel update.
Download a linux distro¶
-
Open the Microsoft Store and choose your favorite linux distribution by searching for them (I prefer Ubuntu):
- Ubuntu
- Debian
-
From the distro's page, select Get
-
Once done installing, open up Powershell as administrator and run (replace distro with the name of the distro you installed):
wsl --set-default-version 2
wsl --set-version [Distro] 2
Finalizing¶
-
To complete the initialization of your newly installed distro, launch a new instance by searching in the Start menu and launching the distro
-
The first time a newly installed distro runs, a Console window will open, and you'll be asked to wait for a minute or two for the installation to complete
-
Once installation is complete, you will be prompted to create a new user account (and its password)
-
Most distros ship with an empty/minimal package catalog. You should regularly be updating your package catalog, and upgrading your installed packages using your distro's preferred package manager
sudo apt-get update && sudo apt-get upgrade