您的位置:首页 > 运维架构 > Linux

Linux 查看OS Type方法

2010-12-09 16:30 239 查看
由于需要在不同的linux 平台上跑build,鉴于平台之间的差异,需要判断各个平台的OS版本来区分具体的操作。

检查查了下linux 查看系统版本的几种方法。还不少!嘿嘿

Linux 查看系统版本的几种方法:

(1)uname -a

Linux pmx02r4****** 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux

(2)cat /etc/issue

Red Hat Enterprise Linux AS release 4 (Nahant)

Kernel \r on an \m

(3)cat /proc/version

Linux version 2.6.9-5.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005

(4)lsb_release -a

LSB Version: 1.3

Distributor ID: RedHatEnterpriseAS

Description: Red Hat Enterprise Linux AS release 4 (Nahant)

Release: 4

Codename: Nahant

UNAME(1) User Commands UNAME(1)

NAME

uname - print system information

SYNOPSIS

uname [OPTION]...

DESCRIPTION

Print certain system information. With no OPTION, same as -s.

-a, --all

print all information, in the following order:

-s, --kernel-name

print the kernel name

-n, --nodename

print the network node hostname

-r, --kernel-release

print the kernel release
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: