本文摘自PHP中文网,作者尚,侵删。

查看centos系统版本的方法:
推荐:《centos使用教程》
1、使用lsb_release -a命令查看
1 2 3 4 5 6 | [root@centos6 ~]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.9 (Final)
Release: 6.9
Codename: Final
|
但是,centos7.3里没有lsb_release命令。
2、使用cat /etc/os-release命令打开文件查看
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | [root@centos7 app]# cat /etc/os-release
NAME= "CentOS Linux"
VERSION= "7 (Core)"
ID= "centos"
ID_LIKE= "rhel fedora"
VERSION_ID= "7"
PRETTY_NAME= "CentOS Linux 7 (Core)"
ANSI_COLOR= "0;31"
CPE_NAME= "cpe:/o:centos:centos:7"
HOME_URL= "https://www.centos.org/"
BUG_REPORT_URL= "https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT= "CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION= "7"
REDHAT_SUPPORT_PRODUCT= "centos"
REDHAT_SUPPORT_PRODUCT_VERSION= "7"
|
3、使用cat /etc/redhat-release(/etc/centos-release)命令查看
阅读剩余部分
相关阅读 >>
linux系统CentOS是什么?
CentOS系统如何查看端口是否开放
CentOS怎么执行脚本
CentOS8安装不了docker怎么办
CentOS 80端口无法访问怎么解决
CentOS下ping不通网关怎么办
CentOS如何关闭防火墙与端口
详解CentOS7防火墙设置
CentOS系统怎么安装桌面环境
CentOS下命令行中文乱码怎么办
更多相关阅读请进入《CentOS》频道 >>
转载请注明出处:木庄网络博客 » centos如何查看版本