1. 程式人生 > >特殊場景下,如何判斷當前系統的發行版。

特殊場景下,如何判斷當前系統的發行版。

pretty root 判斷 oot 系統 linu rhel pre version

[root@localhost ~]# cat /etc/*release
CentOS Linux release 7.4.1708 (Core)
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"

特殊場景下,如何判斷當前系統的發行版。