-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
I want to find a fast way to detect the current version of WSL for my project fastfetch.
Describe the solution you'd like
I suggest that wslinfo should introduce a new flag called --wsl-version to print the version of current WSL instance
$ wslinfo --wsl-version
2.2.2.0
Alternately, provide /mnt/wsl/versions.txt which contains the output of wsl.exe --version. We already have /mnt/wslg/versions.txt. WSL can have the same.
Alternately, provide an environment variable called WSL_VERSION
Describe alternatives you've considered
Currently I am using wsl.exe --version. This command costs about 100ms while the whole program costs only 200ms.
Additional context

Reactions are currently unavailable