# AS ADMIN Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform # Use this command to convert a distro to use the WSL 2 architecture or use the WSL 1 architecture. # : the specific Linux distro (e.g. “Ubuntu”) # : 1 or 2 (for WSL 1 or 2) # wsl --set-version # Changes the default install version (WSL 1 or 2) for new distributions. # wsl --set-default-version 2 # Only list the distribution names. # This command is useful for scripting since it will only output the names of distributions you have installed without showing other information like the default distro, versions, etc. # wsl --list --quiet # Shows detailed information about all the distributions. # This command lists the name of each distro, what state the distro is in, and what version it is running. It also shows which distributions is default with an asterisk. # wsl --list --verbose # Immediately terminates all running distributions and the WSL 2 lightweight utility virtual machine. # The VM that powers WSL 2 distros is something that we aim to manage entirely for you, and so we spin it up when you need it and shut it down when you don’t. There could be cases where you would want to shut it down manually, and this command lets you do that by terminating all distributions and shutting down the WSL 2 VM. # wsl --shutdown