1、查看Linux內核版本命令(兩種方法):linux
一、cat /proc/versioncentos
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.8.1.el5.centos.plus (mockbuild@builder17.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Jul 7 11:50:45 EDT 2010dom
二、uname -aui
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.8.1.el5.centos.plus #1 SMP Wed Jul 7 11:50:45 EDT 2010 i686 i686 i386 GNU/Linux.net
2、查看Linux系統版本的命令(3種方法):
一、lsb_release -a,便可列出全部版本信息:ip
[root@localhost ~]# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Finalget
這個命令適用於全部的Linux發行版,包括Redhat、SuSE、Debian…等發行版。io
二、cat /etc/redhat-release,這種方法只適合Redhat系的Linux:class
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)mock
三、cat /etc/issue,此命令也適用於全部的Linux發行版。
[root@localhost ~]# cat /etc/issue CentOS release 5.5 (Final) Kernel \r on an \m