首页 > 代码库 > 查看centos版本

查看centos版本

命令1:cat /etc/os-release
[root@localhost ~]$ 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"


命令2:cat /etc/redhat-release 

[root@localhost ~]$ cat /etc/redhat-release 

CentOS Linux release 7.1.1503 (Core)


命令3:rpm -q centos-release

[root@localhost ~]$  rpm -q centos-release

centos-release-7-1.1503.el7.centos.2.8.x86_64


 命令4:uname -a

命令5:cat /proc/version


本文出自 “一步,一步” 博客,请务必保留此出处http://summerflowers.blog.51cto.com/5202033/1859318

查看centos版本