Created
January 18, 2020 01:46
-
-
Save thombashi/fdc4643cd26f36dc57288c30e94f725a to your computer and use it in GitHub Desktop.
Detect WSL by shell commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if uname -r | \grep -q Microsoft ; then | |
echo "WSL" | |
else | |
echo "non WSL" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment