-
Bastien DUMONT authoredBastien DUMONT authored
WSL
First open Powershell as administrator and launch the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
This command will install WSL on your computer. After this, you'll need to ==reboot==.
Upgrade to WSL 2
If you're on WSL 1 and want to upgrade to WSL 2, here is the process:
-
Open an elevated powershell and paste the following command:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
-
Then, enable the Virtual Machine Platform optional feature.
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
-
Now restart your computer to apply these features. Once it's done, open an elevated powershell again and set the default wsl version to 2
wsl --set-default-version 2
!!! warning "You might see this message after running the command above" WSL 2 requires an update to its kernel component. For information please visit wsl2kernel.
If you install the MSI from wsl2kernel. Once you have the kernel installed, please run wsl --set-default-version 2
again and it should complete successfully without showing the message.
Start WSL
After reboot, open the microsoft store and install the distribution of your choice, for instance: ==Ubuntu 20.04 lts==. Once it's done, open it and after a few minutes you'll be prompted for the creation of a user account.
To make sure it's correctly installed and working, you can open Powershell and paste the following command :
wsl.exe --list --running
Now you should see the name of your distribution in the list. And follow set_up_your_environment