linux--查看系统版本

查看系统版本

方法1:

[root@localhost ~]# lsb_release  -a

LSB Version:      :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:

                         core-4.0-noarch:graphics-4.0-amd64:

                         graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID:   RedHatEnterpriseServer
Description:       Red Hat Enterprise Linux Server release 6.5 (Santiago)
Release:             6.5
Codename:       Santiago

说明:  这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版

            LSB Version ---- 大白话就是 : 规范版本,以免乱套

         Linux标准规范 (英语: Linux Standard Base,LSB)是一个在Linux基金会结构下对Linux发布版的联合项目,

                                使Linux操作系统符合软件系统架构,或文件系统架构标准的规范及标准。

 

方法2:

[root@localhost ~]# cat /etc/issue
                                Red Hat Enterprise Linux Server release 6.5 (Santiago)
                                Kernel \r on an \m

方法3:

[root@localhost ~]# cat /etc/redhat-release
                                Red Hat Enterprise Linux Server release 6.5 (Santiago)

方法4:

[root@localhost ~]# rpm -qa | grep  redhat-release
                                redhat-release-server-6Server-6.5.0.1.el6.x86_64

有的版本返回如下信息

[root@q1test01 ~]# 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有效

 

版本说明

    * Red Hat Enterprise Linux AS — for high-end and mission-critical systems   (Advanced Server)   

    * Red Hat Enterprise Linux ES — for small/mid-range servers   (Entry Server )

    * Red Hat Enterprise Linux WS — for technical/design workstation clients  (workstation )

    * Red Hat Desktop — for secure, managed clients  (Desktop  )

 

参考:

http://blog.chinaunix.net/uid-49097-id-78198.html

你可能感兴趣的:(linux,linux,系统版本)