powersj / whatsthis

Am I on a cloud, in a container, virtualized, or plain bare metal?

Home Page:https://powersj.github.io/whatsthis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WSL Detection fails

powersj opened this issue · comments

The current WSL detection logic tests for "Microsoft" and not "microsoft" As such whatsthis fails to correctly identify the WSL subsystem.

$ cat /proc/sys/kernel/osrelease
4.19.128-microsoft-standard
$ cat /proc/version
Linux version 4.19.128-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Tue Jun 23 12:58:10 UTC 2020

The above is from WSL 2, the following is from WSL 1.0:

$ cat /proc/sys/kernel/osrelease
4.4.0-19041-Microsoft
$ cat /proc/version
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020