以当前项目组服务器安装的Suse Linux为例,主要可以从以下配置文件或命令查看系统或内核的版本
1、cat /proc/version
hghciuccslx088:~ # cat /proc/version
Linux version 2.6.32.12-0.7-default (
geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP 2010-05-20 11:14:20 +0200
2、
more /etc/SuSE-release
hghciuccslx088:~ # more /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 1
###对应的RedHat可以查看etc/redhat-release文件###
3、
lsb_release -a
hghciuccslx088:~ # lsb_release -a
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID: SUSE LINUX
Description: SUSE Linux Enterprise Server 11 (x86_64)
Release: 11
Codename: n/a
4、
cat /etc/issue
hghciuccslx088:~ # cat /etc/issue
Huawei's internal systems must only be used for conducting Huawei's business or for purposes authorized by Huawei management.Use is subject to audit at any time by Huawei management.
5、
uname -a
hghciuccslx088:~ # uname -a
Linux hghciuccslx088 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/Linux