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
I've been looking for ways to detect that as well. So far I've found 2.
/proc/sys/kernel/osrelease is "3.4.0-Microsoft"
/proc/version is "Linux version 3.4.0-Microsoft
(Microsoft@Microsoft.com) (gcc version 4.7 (GCC) ) #1 SMP PREEMPT
Wed Dec 31 14:42:53 PST 2014"
If you just use the Ubuntu distribution installed by default there should be no problems with using them, as they said that it would be unlikely for them to set either to something that doesn't contain "Microsoft" or "WSL".
However, if you were to install a different Linux distribution, I'm pretty sure that the contents of /proc/sys/kernel/osrelease and /proc/version will change, since the distro wouldn't have been compiled by Microsoft.