Obviously, there is the awesome uname -a command to tell you kernel specific info. But that doesn’t tell you exactly what distro version you are running…Here’s how
Debian:
Look in /etc/debian_version
Ubuntu:
Look at /etc/issue OR /etc/lsb-release
More here.
RHEL/CentOS/Fed:
Look at /etc/redhat-release
More here.