Different UNIX-like operating systems store information about their release versions differently. If you know what OS you have, but not sure about the version, then here's how you can find out:
RedHat Linux
bash-3.1$ cat /etc/redhat-release Red Hat Enterprise Linux Client release 5 (Tikanga)
Ubuntu Linux
bash-3.1$ cat /etc/issue Ubuntu 6.10 n l
SUSE Linux
~> cat /etc/SuSE-release SUSE Linux Enterprise Desktop 10 (x86_64) VERSION = 10
Sun Solaris
bash-2.03$ cat /etc/release Solaris 8 2/04 s28s_hw4wos_05a SPARC Copyright 2004 Sun Microsystems, Inc. All Rights Reserved. Assembled 08 January 2004
ilya says
for linux you can also try to run lsb_release -a
Hamilton José Brumatto says
Release info for (k)ubuntu:
lsb_release -a
or
cat /etc/lsb_release
Dan says
uname -a
will tell you on almost any system which system you are on, which architecture, and which patch level,
This is true on ANY unix system
Linux kplipmn01 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
Karim Djaafar says
For Linux CentOS
cat /etc/centos-release
CentOS release 6.5 (Final)