linux查看系统版本

 

 RHEL7.0以下,查看系统版本的方式:

[rusky@rheltest1 ~]$ cat /proc/version 
Linux version 2.6.32-279.el6.x86_64 (mockbuild@x86-008.build.bos.redhat.com) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Jun 13 18:24:36 EDT 2012
[rusky@rheltest1 ~]$ uname -a
Linux rheltest1.com 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[rusky@rheltest1 ~]$ lsb_release -a
LSB Version:    :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.3 (Santiago)
Release:        6.3
Codename:       Santiago
[rusky@rheltest1 ~]$ cat /etc/issue
Red Hat Enterprise Linux Server release 6.3 (Santiago)
Kernel \r on an \m

[rusky@rheltest1 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[rusky@rheltest1 ~]$ 

RHEL7版本中的新命令hostnamectl:

hostnamectl status这个命令很实用,主机名、操作系统版本、内核版本、系统架构...一个命令搞定。

[root@rhel7 ~]# hostnamectl status
   Static hostname: rhel7.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: c9e1b1f7c9514da7a2e9448646555486
           Boot ID: 210401bc6bae46d5a5104eb767e42934
    Virtualization: kvm
  Operating System: Red Hat Enterprise Linux Server 7.2 (Maipo)
       CPE OS Name: cpe:/o:redhat:enterprise_linux:7.2:GA:server
            Kernel: Linux 3.10.0-327.el7.x86_64
      Architecture: x86-64
[root@rhel7 ~]# 

 

posted on 2016-03-10 11:57  遠離塵世の方舟  阅读(575)  评论(0编辑  收藏  举报

导航