There's no one command that will tell you the exact OS/Version across all linux distros. /etc/issue is often modified, so this doesn't necessarily tell you anything about the OS.
will tell you for any RH based distro, and I believe ubuntu started using a release file as well. The best way to figure it out (will work on any linux OS)
This will list the kernel version installed as well as whether it's 32 or 64-bit. You could then search for that kernel, as they are usually versioned specifically for each distro. This too isn't foolproof since someone could compile their own kernel, but you should be able to at least get an idea.
You Can also get some clues from