(1)直接查看版本

[root@localhost user]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
[root@localhost user]#

(2)使用工具查看版本

安装lsb_release命令工具:

# yum install -y redhat-lsb

执行命令:

[root@localhost user]# lsb_release -a

查看Linux(Centos)发行版本命令:cat /etc/redhat-release_linux