先使用 yum 安装 redhat-lsb:
yum install -y redhat-lsb
安装完成后,使用 -a 查看
[root@root yum.repos.d]# 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 8.3.2011
Release: 8.3.2011
Codename: n/a
redhat-release cat 查看版本号
[root@root yum.repos.d]# cat /etc/redhat-release
CentOS Linux release 8.3.2011
uname 查看内核版本
[root@root6 yum.repos.d]# uname -a
Linux 10-60-71-116 4.18.0-240.1.1.el8_3.x86_64 #1 SMP Thu Nov 19 17:20:08 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux