Pretty straightforward, the usual places to figure out the OS you\'re on seem to be identical to plain Ubuntu on Ubuntu for Windows. For example uname -a is ide
uname -a
Updating answer by @per-lundberg:
if [[ ! -z "$IS_WSL" && ! -z "$WSL_DISTRO_NAME" ]]; then echo "You are not in wsl!" else echo "You are in wsl!" fi
Note: IS_WSL existed in older verion while WSL_DISTRO_NAME exist in current version.
IS_WSL
WSL_DISTRO_NAME