Recently discussed
here. The short answer is that there's no universal way to find out what distro you're running! "uname -a" tells you some interesting info, and some distro-specific information is listed in that
thread. But basically, it's mostly detective work.