思路一:
在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. (Core)
Release: 7.2.
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 (Core)
CPE OS Name: cpe:/o:centos:centos:
Kernel: Linux 3.10.-327.22..el7.x86_64
Architecture: x86-