一、檢視Linux核心版本命令(兩種方法):
1、cat /proc/version
[root@pythontab.com home]# cat /proc/version
Linux version 2.6.32-573.22.1.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Wed Mar 23 00:37:12 UTC 2014
2、uname -a
[root@pythontab.com home]# uname -a
Linux pythontab.com 2.6.32-573.22.1.el6.i686 #1 SMP Wed Mar 23 00:37:12 UTC 2014 i686 i686 i386 GNU/Linux
二、檢視Linux系統版本的命令(3種方法):
1、lsb_release -a,即可列出所有版本資訊:
[root@pythontab.com home]# lsb_release -a
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
這個命令適用於所有的Linux發行版,包括RedHat、SUSE、CentOS、Debian…等發行版。
2、cat /etc/redhat-release,這種方法只適合Redhat系的Linux:
[root@pythontab.com home]# cat /etc/redhat-release
CentOS release 6.5 (Final)
3、cat /etc/issue,此命令也適用於所有的Linux發行版。
[root@pythontab.com home]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m