This is a short post on how to check or upgrade/downgrade the version of Windows Subsystem for Linux (WSL) running on Windows 10 or Windows 11 host.

To check WSL version set to installed Linux distro, execute wsl -l -v or wsl --list --verbose

C:\Users\AwsJunkie>wsl --list --verbose
  NAME           STATE           VERSION
* Ubuntu         Stopped         1

If you have upgraded from WSL1 to WSL2 and previously installed Linux Distro is using WSL1, you can update the same using wsl --set-version <linux-distro-name> <version#> command. For example,

C:\Users\AwsJunkie>wsl --set-version Ubuntu 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion complete.

C:\Users\AwsJunkie>wsl -l -v
  NAME           STATE           VERSION
* Ubuntu         Stopped         2  

WSL version can be either 1 or 2 at the time of writing this article.
You can use the command to downgrade WSL2 to WSL1 as well.

To change the default version to WSL1 or WSL2 for new installation of Linux distributions, run wsl --set-default-version <version#> command.

C:\Users\AwsJunkie>wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.

Relevant usage of wsl command

C:\Users\AwsJunkie>wsl --help
Copyright (c) Microsoft Corporation. All rights reserved.

Usage: wsl.exe [Argument] [Options...] [CommandLine]

Arguments for managing Windows Subsystem for Linux:

    --set-default-version <Version>
        Changes the default install version for new distributions.

    --set-version <Distro> <Version>
        Changes the version of the specified distribution.

References