Can a bash script detect if it's running in "Ubuntu on Windows" vs native Ubuntu? If so, how?
I ran env
on both machines and didn't see any obvious environmental variable differences. I could test for the existence of the /mnt/c
directory, but that is not foolproof because that directory could potentially also be present on native Ubuntu.