Skip to content

Instantly share code, notes, and snippets.

@zenojunior
Created February 27, 2020 13:00
Show Gist options
  • Save zenojunior/f00a6ce2b5c5bd9a99dae30787adfa9b to your computer and use it in GitHub Desktop.
Save zenojunior/f00a6ce2b5c5bd9a99dae30787adfa9b to your computer and use it in GitHub Desktop.
What WSL version? 1 or 2?
[ $(grep -oE 'gcc version ([0-9]+)' /proc/version | awk '{print $3}') -gt 5 ] && \
echo "WSL2" || echo "WSL1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment