npm isntallinsanely fast! I was also doing a demo
First of all, to use WSL2. You need to use the Preview version of Windows
(Because it is a preview version, we recommend that you keep a backup just in case)
Join Windows Insider and install the Preview version of Windows
To check the version, run the
ver command at the command prompt and make sure the version of Windows is
10.0.18917 or higher.
C:\Users\user1>ver Microsoft Windows [Version 10.0.19041.21]
PS C:\Users\user1> wsl -l The distribution is not installed on the Windows subsystem for Linux. Distributions can be installed by visiting the Microsoft Store: https://aka.ms/wslstore
https://aka.ms/wslstore to open the Microsoft Store and see the distros you can install.
This time I will install Ubuntu
Booting Ubuntu from the store will start the subsystem installation
Installing, this may take a few minutes... Please create a default UNIX user account. The username does not need to match your Windows username. For more information visit: https://aka.ms/wslusers Enter new UNIX username: myuser Enter new UNIX password:
[email protected]:~$ ls [email protected]:~$ cd .. [email protected]:/home$
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl -lcommand to display the distribution you just installed.
PS C:\Users\user1> wsl -l Windows subsystem distribution for Linux: Ubuntu (default)
PS C:\Users\user1> wsl --set-version Ubuntu 2 Converting. This process can take a few minutes... For the main differences from WSL 2, https://aka.ms/See wsl2 The conversion is complete.