1. 檢視核心版本命令:
1) [root@q1test01 ~]# cat /proc/version
linux version 2.6.9-22.elsmp ([email protected]) (gcc version 3.4.4 20050721 (red hat 3.4.4-2)) #1 smp mon sep 19 18:00:54 edt 2005
2) [root@q1test01 ~]# uname -a
linux q1test01 2.6.9-22.elsmp #1 smp mon sep 19 18:00:54 edt 2005 x86_64 x86_64 x86_64 gnu/linux
3) [root@q1test01 ~]# uname -r
2.6.9-22.elsmp
2. 檢視linux版本:
1) 登入到伺服器執行 lsb_release -a ,即可列出所有版本資訊,例如:
# lsb_release -a
lsb version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-
ia32:graphics-3.0-noarch
distributor id: redhatenterpriseas
description: red hat enterprise linux as release 4 (nahant update 2)
release: 4
codename: nahantupdate2
注:這個命令適用於所有的linux,包括redhat、suse、debian等發行版。
2) 登入到linux執行cat /etc/issue,例如如下:
# cat /etc/issue
red hat enterprise linux as release 4 (nahant update 2)
kernel \r on an \m
3) 登入到linux執行cat /etc/redhat-release ,例如如下:
# cat /etc/redhat-release
red hat enterprise linux as release 4 (nahant update 2)
注:這種方式下可以直接看到具體的版本號,比如 as4 update 1
4)登入到linux執行rpm -q redhat-release ,例如如下:
# rpm -q redhat-release
redhat-release-4as-3
注:這種方式下可看到乙個所謂的release號,比如上邊的例子是3
這個release號和實際的版本之間存在一定的對應關係,如下:
redhat-release-3as-1 -> redhat enterprise linux as 3
redhat-release-3as-7.4 -> redhat enterprise linux as 3 update 4
redhat-release-4as-2 -> redhat enterprise linux as 4
redhat-release-4as-2.4 -> redhat enterprise linux as 4 update 1
redhat-release-4as-3 -> redhat enterprise linux as 4 update 2
redhat-release-4as-4.1 -> redhat enterprise linux as 4 update 3
redhat-release-4as-5.5 -> redhat enterprise linux as 4 update 4
另:第3)、4)兩種方法只對redhat linux有效
5)#file /bin/bash
/bin/bash: elf 32-bit lsb executable, intel 80386, version 1 (sysv), for gnu/linux 2.6.9, dynamically linked (uses shared libs), for gnu/linux 2.6.9, stripped
6)#file /bin/cat
/bin/bash: elf 32-bit lsb executable, intel 80386, version 1 (sysv), for gnu/linux 2.6.9, dynamically linked (uses shared libs), for gnu/linux 2.6.9, stripped
檢視linux系統版本命令
一。檢視核心版本命令 1 root sor sys cat proc version linux version 2.6.18 238.el5 mockbuild x86 012.build.bos.redhat.com gcc version 4.1.2 20080704 red hat 4.1....
檢視linux系統版本命令
一。檢視核心版本命令 1 root sor sys cat proc version linux version 2.6.18 238.el5 mockbuild x86 012.build.bos.redhat.com gcc version 4.1.2 20080704 red hat 4.1....
檢視linux系統版本命令
一。檢視核心版本命令 1 root sor sys cat proc version linux version 2.6.18 238.el5 mockbuild x86 012.build.bos.redhat.com gcc version 4.1.2 20080704 red hat 4.1....