Microsoft provides setup instructions for installing both WSL and a WSL distribution.
You will need administrative access on your computer if WSL was not preinstalled.
To check if WSL is already installed on your Windows PC, open Windows Command Prompt, Terminal, or Powershell and run wsl --list --online.
This should return a list of available WSL distributions.
In order to make use of WSL features, you will also need to install a Linux distribution.
Distributions can be obtained through the Microsoft Store, or using command line.
Open the Microsoft store, search for 'Ubuntu', find and install the
latest version of the Ubuntu LTS it should look something like
'Ubuntu 20.04 LTS' , though you may find a later version.
Close the “Add your Microsoft account.. dialogue box as you do not
need an account for the installation.You may have to click “Install”
for a second time (If the above dialogue box reappears, close as
before and download/install will begin).
Open 'Windows Power Shell' and type
wsl --install -d Ubuntu-20.04
When it has finished downloading, the Ubuntu Terminal will appear and prompt you to “Enter new UNIX username”
and press Enter.
This can be anything you want, although we reccomend using the same as your Windows username.
Now, type in a new password for the username you picked and press
Enter (this password can be anything you want, although you shouldn't need to enter it again).
Then retype the password to confirm and press Enter.