<code id='btbup'><strong id='btbup'></strong></code>

  • <tr id='btbup'><strong id='btbup'></strong><small id='btbup'></small><button id='btbup'></button><li id='btbup'><noscript id='btbup'><big id='btbup'></big><dt id='btbup'></dt></noscript></li></tr><ol id='btbup'><table id='btbup'><blockquote id='btbup'><tbody id='btbup'></tbody></blockquote></table></ol><u id='btbup'></u><kbd id='btbup'><kbd id='btbup'></kbd></kbd>
      1. <fieldset id='btbup'></fieldset>

        1. <ins id='btbup'></ins>

        2. <acronym id='btbup'><em id='btbup'></em><td id='btbup'><div id='btbup'></div></td></acronym><address id='btbup'><big id='btbup'><big id='btbup'></big><legend id='btbup'></legend></big></address>

          <i id='btbup'></i>
            <dl id='btbup'></dl>
            <span id='btbup'></span><i id='btbup'><div id='btbup'><ins id='btbup'></ins></div></i>

            查看Linux系统版本信息的方法小结

            • 时间:
            • 浏览:9
            • 来源:124软件资讯网

                怎样检察Linux系统使用的版本信息呢? 下面这篇文章网络、整理了一些常见的检察Linux系统版本的要领  。由于手头只有Oracle Linux、Centos Linux、Redhat Linux三个版本Linux ,以是像Debian、Ubuntu之类的Linux系统,下面要领在这些版本都没测试过  。

                1:more /etc/issue 下令检察

                1.1 Oracle Linux

                代码如下:

                [root@DB-Server ~]# more /etc/issueOracle Linux Server release 5.7Kernel \r on an \m

                1.2 Centos Linux

                代码如下:

                [root@Centos2 ~]# more /etc/issueCentOS release 6.4 (Final)Kernel \r on an \m

                1.3 RedHat Linux

                代码如下:

                [root@getlnx05 ~]# more /etc/issueRed Hat Enterprise Linux Server release 5.7 (Tikanga)Kernel \r on an \m

                2: lsb_release -a 下令检察

                2.1 Oracle Linux

                代码如下:

                [root@DB-Server ~]# lsb_release -a

                LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch

                Distributor ID: EnterpriseEnterpriseServer

                Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)

                Release: 5.7

                Codename: Carthage

                2.2 Centos Linux

                代码如下:

                [root@Centos2 ~]# 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: CentOS

                Description: CentOS release 6.4 (Final)

                Release: 6.4

                Codename: Final

                2.3 RedHat Linux

                代码如下:

                [root@getlnx05 ~]# lsb_release -a

                LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch

                Distributor ID: RedHatEnterpriseServer

                Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga)

                Release: 5.7

                Codename: Tikanga

                3:cat /etc/redhat-release 下令检察

                这个下令应该只有部门Linux可以检察 ,不是所有版本Linux都可以使用该下令

                3.1 Oracle Linux

                代码如下:

                [root@DB-Server ~]# cat /etc/redhat-release

                Red Hat Enterprise Linux Server release 5.7 (Tikanga)

                [root@DB-Server etc]# cat /etc/*release

                Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)

                Oracle Linux Server release 5.7

                Red Hat Enterprise Linux Server release 5.7 (Tikanga)

                [root@DB-Server etc]# ls /etc/*lease

                /etc/enterprise-release /etc/oracle-release /etc/redhat-release

                [root@DB-Server etc]#

                3.2 Centos Linux

                代码如下:

                [root@Centos2 ~]# cat /etc/redhat-release

                CentOS release 6.4 (Final)

                [root@Centos2 ~]# cat /etc/*release

                CentOS release 6.4 (Final)

                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

                CentOS release 6.4 (Final)

                CentOS release 6.4 (Final)

                [root@Centos2 ~]# ls /etc/*release

                /etc/centos-release /etc/lsb-release /etc/redhat-release /etc/system-release

                [root@Centos2 ~]#

                3.3 RedHat Linux

                代码如下:

                [root@getlnx05 ~]# cat /etc/redhat-release

                Red Hat Enterprise Linux Server release 5.7 (Tikanga)

                [root@getlnx05 ~]# cat /etc/*release

                Red Hat Enterprise Linux Server release 5.7 (Tikanga)

                [root@getlnx05 ~]# ls /etc/*release

                /etc/redhat-release

                [root@getlnx05 ~]#

                4 rpm -q redhat-release下令检察  ,只适用于Redhat Linux

                代码如下:

                [root@getlnx05 ~]# rpm -q redhat-release

                redhat-release-5Server-5.7.0.3