The updated version of WSL named WSL2 is part of the latest Windows 10 update version 2004. To get access, you will need to update the Windows 10 to at least version 2004 (May 2020 update) or install the preliminary cumulative update KB5004296 via Windows Update. Microsoft said in the official blog post.
How to Install Linux inside Windows 10?
If you have updated your Windows 10 with the latest version. You can now just type simple command for installing any Linux distro inside Windows 10 subsystem. To do this simply follow these steps:
Open CMD or Powershell with administrator rights. Type wsl.exe –install and enter.
After pressing the enter button, the system will automatically install the recent Ubuntu Linux distribution and its important components. Upon completion of the process, a reboot will be required, after that the installed Linux distribution will start to complete the configuration. If you don’t want to install Ubuntu, you can run the command wsl.exe –list –online to see a list of available alternatives to the Ubuntu. After choosing the most suitable Linux distribution, you can install it by entering the command wsl –install –d <distribution_name>. You can install several additional Linux distributions using this command.
Important WSL commands
In addition to the installation, Microsoft has provided several other commands for managing the Linux kernel in WSL2.
wsl –update will update it to the latest available version. wsl –update rollback will roll back to the previous one. wsl –status will show information about the WSL configuration (the default distribution and Linux kernel version).
If you have any issues with the installation and commands, you can follow up with WSL team members on Twitter. In case of technical issues, you can file them on the Microsoft/WSL Github repo. You can visit WSL documentation to learn more about WSL.