There are a few ways to determine the installed WSL version, depending on how it was installed. Given that your installation does not have the --version
command available, it's most likely you are running an in-box version of WSL (one that comes with Windows as a feature).
The --version
option is only available in the Application version of WSL (installed from the Microsoft Store or a WSL Releases download).
Older, in-box/feature versions of WSL are installed with Windows releases/updates, and are versioned after their Windows build.
Older Preview versions (under Windows 10) also follow this versioning and were released with Insider/Preview builds of Windows. It's extremely unlikely that you are running a Windows 10 Preview version at this point, since all Developer/Insider builds have currently expired.
The latest in-box version at this time is 22000, which corresponds to the Windows 11 release. Even in Windows 11, 22H2, the in-box feature-set is still the same as in 22000.
For in-box/feature versions (and older in-box Preview versions), you can find the version by either:
Using File Explorer to navigate to C:\Windows\System32\wsl.exe
, right-click, select Properties, go to the Details tab, and look for the File Version.
Or, from PowerShell:
(get-item C:\windows\system32\wsl.exe).VersionInfo.FileVersion
Starting soon after the Windows 11 release, WSL became available in the Microsoft Store as an application package, first as a Preview, and with 1.0.0, as a generally-available release.
These application packages are numbered with the point-release format you mention above, with the latest version currently being the 1.0.0 release. You can see a history of these releases in the WSL Github repo and even still download and install them if you wish.
These releases of WSL does add a wsl --version/-v
command which shows something like:
WSL version: 0.58.3.0
Kernel version: 5.10.102.1
WSLg version: 1.0.33
MSRDC version: 1.2.2924
Direct3D version: 1.601.0
Windows version: 10.0.22000.613
You could also get just the WSL version by checking the Appx package that is installed from the Store through PowerShell:
(Get-AppxPackage | ? Name -eq "MicrosoftCorporationII.WindowsSubsystemforLinux").Version
Related:
In the application package (Store) version, you can update the full WSL release (including the kernel) with wsl --update
.
However, in older, in-box versions of WSL, the wsl --update
command will only update the WSL2 kernel to the latest release. Note that this may or may not correspond to the latest available on Github, as I believe these are usually given a test-run through the Preview before being made generally available.
wsl --help
shows the following information --update
on older, in-box versions of WSL:
--update [Options]
If no options are specified, the WSL 2 kernel will be updated
to the latest version.
Options:
--rollback
Revert to the previous version of the WSL 2 kernel.