To check the name of the operating system installed on the machine and its version, we can use the easy way below. Always mentioned in the /etc/*-release file is the variant of Linux. See below:-
1) On CentOS and RHEL:-
cat /etc/redhat-release
CentOS release 6.4 (Final)
2) On Debian
:~# cat /etc/issue
Debian GNU/Linux 5.0 \n \l
3) On Ubuntu
root@ubuntu:~# cat /etc/issue
Ubuntu 13.04 \n \l
]]>