1. 查看内核版本命令:
1) [root@q1test01 ~]# cat /proc/version
[dts@localhost ~]$ cat /proc/version
Linux version 2.6.18-308.el5 (mockbuild@x86-007.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jan 27 17:17:51 EST 2012
2) [root@q1test01 ~]# uname -a
[dts@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
3) [root@q1test01 ~]# uname -r
[dts@localhost ~]$ uname -r
2.6.18-308.el5
2. 查看Linux版本
1)lsb_release -a
[dts@localhost ~]$ lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Release: 5.8
Codename: Tikanga
[dts@localhost ~]$
2) cat /etc/issue
[dts@localhost ~]$ cat /etc/issue
Red Hat Enterprise Linux Server release 5.8 (Tikanga)
Kernel \r on an \m
3) 查看服务器型号
dmidecode | grep "Product"