14

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.

8
  • What build of Windows 10 are you using? Commented May 12, 2020 at 21:39
  • Version 10.0.18363 Build 18363
    – Soerendip
    Commented May 12, 2020 at 22:04
  • Apparently, not all updates are installed yet.
    – Soerendip
    Commented May 12, 2020 at 22:04
  • 1
    To update to WSL 2, you must meet the follow criteria: Running Windows 10, updated to version 2004, Build 19041 or higher.
    – JosefZ
    Commented May 12, 2020 at 22:16
  • 1
    @Sören - Your original question was answered. You shouldn’t edit your question in an effort to get an answer to a unrelated question. Despite the fact you added an unrelated question the current answer still answers it
    – Ramhound
    Commented May 15, 2020 at 22:47

1 Answer 1

10
  1. 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:

enter image description here

  1. 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.

enter image description here

6
  • And when is start wsl with wsl who do I know the correct one is started? They look the same?
    – Soerendip
    Commented May 13, 2020 at 2:04
  • 1
    If you don't have a Windows 10 Insider Build, you have not got WSL2 Commented May 13, 2020 at 6:17
  • @MichaelHarvey That's my Step 1.
    – K7AAY
    Commented May 13, 2020 at 7:29
  • Soren, the command line with switches as shown in step 2, when started from inside PowerShell just shows the version of WSL.
    – K7AAY
    Commented May 13, 2020 at 7:33
  • The two shells look pretty much alike, so I wasn't sure if that is enough.
    – Soerendip
    Commented May 15, 2020 at 22:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .