brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wsl --list --verbose shows which Linux distros run and on which WSL version

Linux
~/tips/tip-windows-wsl-list-verbose

wsl --list --verbose

Lists the installed WSL distributions with their state and whether they run on WSL 1 or WSL 2.

When you have used WSL for a while, you collect distributions. This command tells you what you have and what is running.

wsl --list --verbose
wsl -l -v

The table has the name of each installed Linux distribution, its state (running or stopped) and the WSL version it uses, 1 or 2. The short form wsl -l -v does the same. The default distribution is marked with an asterisk.

It helps in a few situations: you want to know which distro a plain wsl will start, you wonder why something eats memory, or you need to know whether an old distro is still on WSL 1 before you rely on features that need WSL 2.

From the same page of Microsoft’s basic commands: wsl --status shows the general configuration, such as the default distribution and the kernel version, and wsl --version shows the version of WSL and its components. New distributions installed with wsl --install are set to WSL 2 by default.

The caveat is that the commands in the Microsoft documentation run from PowerShell or the Command Prompt. If you type them inside a Linux distro, replace wsl with wsl.exe, as the docs say, or the shell will not find them.

Further reading: Microsoft Learn: basic commands for WSL

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link