You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detect if the code is ran under Windows Subsystem for Linux
Usage
wsl::is_wsl() returns true under WSL, false otherwise.
Method
A semi-official source lists some pointers. We are going to use the simplest approach here: Testing if /proc/sys/kernel/osrelease contains string Microsoft or WSL.
About
Detect if the program is running under Windows Subsystem for Linux