当前位置首页 > Linux知识

如何快速查看linux的发行版信息

阅读次数:299 次  来源:admin  发布时间:

思路一:

在CentOS中想查看发行版信息,输入了lsb_release -a 命令却报错了,通过输入以下命令进行安装

yum install redhat-lsb -y

然后继续查看发行版信息

[root@localhost ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID:    CentOS
Description:    CentOS Linux release 7.2.1511 (Core) 
Release:    7.2.1511
Codename:    Core

思路二:

[root@localhost Desktop]# hostnamectl
   Static hostname: localhost.localdomain
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 69b31a4876cd4928a7066b323d2f6872
           Boot ID: bf8cc71e4eac428c961414c13a2ae5d6
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-327.22.2.el7.x86_64
      Architecture: x86-64
上一篇:Fedora9建立交叉编译环境
下一篇:centos7中设置nginx的systemctl启动方式