How to verify that WSL 2 is used?
It seems the api has changed and the command that one can find online are mostly outdated. How can I change which version of Windows Subsystem for Linux is used?
Formerly:
wsl -l -v
Update
After, upgrading windows to 2004 I was able to use the above command in the Power Shell.
wsl -l -v
> NAME STATE VERSION
> * Ubuntu-18.04 Running 2
Is that sufficient as a confirmation? The wsl shell's of wsl 1 and 2 seem to look identical.
- At a Windows command prompt, run
ver
Is the next-to-last numeric group version 18917 or higher? If so, go on to step 2. If not, you have version 1. This illustrates the result when the OS is Build 16299:
- Open Windows PowerShell (not the Command Prompt) and enter the command
wsl -l -v
If version 2 is installed properly, you will see the version number.
If you don't see a version number, or if you see an error message, you have version 1.