65

I have Windows Subsystem for Linux, but I don't know which version I have, and many things won't work in version 1. How do I check my version?

  • 1
    I would consider this off topic if the answer is Windows tool. An answer should be from within WSL to be ontopic for me. – Rinzwind Sep 30 '19 at 17:37
  • 2
    @Rinzwind You are welcome to join with me requesting such at github.com/microsoft/WSL/issues/4555 – K7AAY Sep 30 '19 at 18:07
61
  1. At a Windows 10 command prompt, run ver. Is the next-to-last numeric group version 18917 or higher? If so, it is possible you have WSL 2 but not yet verified. Go on to step A or B.
    If you do not see Windows version 18917 or higher, you have version 1.
    This illustrates the result when the OS is Build 16299:

    Version 16299

    A. Open Windows PowerShell 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 (Thank you, Cornea Valentin) you have version 1. Uninstall it then reinstall it as per https://scotch.io/bar-talk/trying-the-new-wsl-2-its-fast-windows-subsystem-for-linux

    B. From the WSL shell prompt, run uname. If the kernel version => 4.19, it's WSL Version 2.

Why is this relevant?

WSL 1 was based on Microsoft's Linux-compatible kernel interface, a compatibility translation layer with no Linux kernel code.

WSL 2 was redesigned with a Linux kernel running in a lightweight VM environment, and innovators have found many more things they can do with WSL 2.

Windows 10 Version 2004 (build 19041.153 & later) enhances WSL2 further; see https://devblogs.microsoft.com/commandline/wsl2-will-be-generally-available-in-windows-10-version-2004/ and https://winaero.com/blog/wsl2-will-ship-with-windows-10-version-2004-with-kernel-updates-via-windows-update/ .

| improve this answer | |
  • 25
    also if he get any errors after: wsl -l -v it's 100% wsl 1. – Cornea Valentin Oct 5 '19 at 15:04
  • 1
    I needed to use uname -r to see the kernel version, but the kernel version ended up being 4.4.0, which I'm pretty sure means WSL 1. – Keara Jun 12 at 15:27
  • 1
    Use uname -a to print kernel version. – thisismydesign Jul 23 at 11:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.