查看内核版本信息
cat /proc/version
[root@localhost ~]# cat /proc/version
Linux version 3.10.0-1062.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Aug 7 18:08:02 UTC 2019
uname -a
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
uname -r
[root@localhost ~]# uname -r
3.10.0-1062.el7.x86_64
查看系统版本
lsb_release -a
[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.7.1908 (Core)
Release: 7.7.1908
Codename: Core
如果提示找不到lsb,请先安装,然后再执行查询
[root@localhost ~]# yum install -y redhat-lsb
cat /etc/redhat-release
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)