This is a quick post on how to check your Windows Subsystem for Linux (WSL) distribution versions, with added info on what being on a different WSL version means.
To check your WSL version we can simply run wsl -l -v
in our PowerShell terminal window. This will show all installed WSL Linux distro names and versions.
What is WSL?
Windows Subsystem for Linux allows users to develop and run applications within a GNU/Linux environment on a Windows computer. Previous to this feature release we needed Virtual Machines (VMs), and dual boot setups were much more common if you wanted local test environments.
WSL Version 1 vs 2?
There are 2 versions of WSL, the old (WSL1), and the new (WSL2). We should ideally be using the latest version like all other software we use in life, however there are some use-cases where we might prefer to use WSL Version 1.
The image below shows the current feature differences between WSL v1 and WSL v2:
Have a look at MS Docs: Comparing WSL 1 and WSL 2 for more information on WSL version differences. One of the key differences in 2022 is that WSL 2 allows Docker.
Checking WSL Distro Versions
To check the versions of your installed WSL distros, open your PowerShell terminal and run the following:
# wsl check version wsl -l -v
The command above lists all installed Windows Subsystem Linux distributions on your local machine, including WSL versions (WSL1 or WSL2) and their state (Running or Stopped).
Other Tips
I’m using Windows Terminal in this demo, which is great for managing multiple WSL distros. We are able to open multiple WSL distros as tabs separate tabs as shown in the screenshot above.
That concludes this post. Feel free to check out some of my other WSL blog posts using the WSL tag link below.
Comments
3 responses to “How to Check WSL Distro Versions”
[…] The first command below, wsl -l -v, is used to check the version of WSL as described in my other post – How to Check WSL Version […]
[…] need to run a basic wsl command to shut down the distro. First, I’m listing my installed WSL distributions followed by the ‘wsl –shutdown‘ […]
[…] For more useful tips on administering WSL, have a look at some of my other WSL blog posts:# How to Reboot WSL (Windows Subsystem for Linux)# How to Upgrade WSL from Version 1 to Version 2# How to Change Default Linux Distro in WSL# How to Check WSL Versions […]