WSL: install and manage Linux distributions
Basic commands to list, install, set as default and remove a Linux distribution under WSL.
Quick reference for installing and managing Linux distributions under WSL (Windows Subsystem for Linux) from PowerShell or the Windows command prompt.
For a manual installation, see the Microsoft documentation on manual WSL installation.
List distributions
wsl --list
Install a distribution
wsl --install -d Debian
Change the default distribution
wsl --setdefault DISTRO-NAME
Remove a distribution
Warning: this command deletes the distribution and all its data.
wsl --unregister Debian