Starting with Windows 10 build 18342 (19H1) and Windows 10 build 18836 (20H1), Microsoft added some new commands to the built-in wsl.exe tool. By using the new arguments, you can quickly list available distros in WSL Linux.
The ability to run Linux natively in Windows 10 is provided by the WSL feature. WSL stands for Windows Subsystem for Linux, which initially, was limited to Ubuntu only. Modern versions of WSL allow installing and running multiple Linux distros from Microsoft Store.
After enabling WSL, you can install various Linux versions from the Store. You can use the following links:
When you start a WSL distro for the first time, it opens a console window with a progress bar. After a moment of waiting, you will be prompted to type a new user account name, and its password. This account will be your default WSL user account that will be used to sign-in automatically every time you run the current distro. Also, it will be included in the 'sudo' group in order to allow it to run commands elevated (as root).
To List Available WSL Linux Distros in Windows 10,
- Open a new command prompt.
- Run the command
wsl.exe --list --allor
wsl.exe -l --all.
- Execute the command
wsl.exe --list --runningto see only running instances of WSL. Alternatively, you can run the command
wsl.exe -l --running.
Running WSL Linux Distros
Starting with Windows 10 build 17046, Windows Subsytem for Linux (WSL) has got support for long-running background tasks, similar to how the Windows subsystem has Services. This is a really impressive change for users of WSL who work with servers like Apache or apps like screen or tmux. Now they can run in the background like regular Linux daemons. This, and a number of others, are reasons to have an active WSL instance in Windows 10.
- Remove User from WSL Linux in Windows 10
- Add or Remove Sudo Users in WSL Linux in Windows 10
- Remove User From WSL Linux Distro in Windows 10
- Add User to WSL Linux Distro in Windows 10
- Update and Upgrade WSL Linux Distro in Windows 10
- Run WSL Linux Distro as Specific User in Windows 10
- Reset and Unregister WSL Linux Distro in Windows 10
- Reset Password for WSL Linux Distro in Windows 10
- All Ways to Run WSL Linux Distro in Windows 10
- Set Default WSL Linux Distro in Windows 10
- Find Running WSL Linux Distros in Windows 10
- Terminate Running WSL Linux Distro in Windows 10
- Remove Linux from Navigation Pane in Windows 10
- Export and Import WSL Linux Distro in Windows 10
- Access WSL Linux Files from Windows 10
- Enable WSL in Windows 10
- Set Default User for WSL in Windows 10
- Windows 10 Build 18836 Shows WSL/Linux File System in File Explorer