各OS毎に異なります
まずはカーネルのバージョンを調べる
[riki@ ~]$ cat /proc/version
Linux version 2.6.18-402.el5 (mockbuild@builder17.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-55)) #1 SMP Tue Feb 10 17:49:04 EST 2015
- uname -a でもOK
[riki@ ~]$ uname -a
Linux sub0000540167.hmk-temp.com 2.6.18-402.el5 #1 SMP Tue Feb 10 17:49:04 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
Debiun系の場合
$ cat /etc/debian_version
4.0
centOS/RedHat Enterprise Linux
[riki@ ~]$ cat /etc/redhat-release
CentOS release 5.11 (Final)
Fedoraの場合
$ cat /etc/fedora-release
Fedora release 9 (Sulphur)