1、cat /proc/version
[root@localhost ~]# cat /proc/version ([email protected]) (gcc version 4.1.2 20080704 (red hat 4.1.2-48)) #1 smp wed jul 7 11:50:45 edt 2010
2、uname -a
[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
二、檢視linux系統版本的指令(3種方法):
1、lsb_release -a,即可列出所有版本資訊:
[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: final
2、cat /etc/redhat-release,這種方法隻适合redhat系的linux:
[root@localhost ~]# cat /etc/redhat-release centos release 5.5 (final)
3、cat /etc/issue,此指令也适用于所有的linux發行版。
[root@localhost ~]# cat /etc/issue kernel \r on an \m