Also published at Dev.to.
You must be running Windows 10 build 1904 or higher (run
ver from cmd.exe to check).
From PowerShell with Admin access (right click PowerShell or a PowerShell shortcut and Run as Administrator)
- Enable WSL, run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Enable "Virtual Machine Platform", run:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Download and install WSL 2 Linux kernel from Microsoft
- Restart Windows for good measure.
- Set default WSL to v2, run:
wsl --set-default-version 2
- Download your favorite Linux distro from the Microsoft Store (Yes, really. I searched for and installed "Ubuntu".)
- Launch and set up Linux by running
And you're off to the races! From here, I'm able to install Node.js, Typescript, Yarn, etc.
Instructions a work in progress...
- Update to WSL 2
- Set v2 as default WSL
- List existing distros
- Upgrade existing distro
- Remove unwanted ("Legacy") distro with --unregister