CentOS7中查看系统版本信息
1、使用“cat /etc/redhat-release”命令查看操作系统详细发行版本号:
2、版本号和位数:
3、“cat /proc/version”命令:
4、使用“lsb_release”命令:
5、使用“cat /etc/os-release”命令:
6、使用“uname”命令查看内核版本:
[root@aiezu.com ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core)
2、版本号和位数:
[root@aiezu.com ~]# rpm -q centos-release centos-release-7-2.1511.el7.centos.2.10.x86_64
3、“cat /proc/version”命令:
[root@aiezu.com ~]# cat /proc/version Linux version 3.10.0-327.36.3.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Mon Oct 24 16:09:20 UTC 2016
4、使用“lsb_release”命令:
[root@aiezu.com ~]# yum -y install redhat-lsb [root@aiezu.com ~]# 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.2.1511 (Core) Release: 7.2.1511 Codename: Core
5、使用“cat /etc/os-release”命令:
[root@aiezu.com ~]# 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"
6、使用“uname”命令查看内核版本:
[root@aiezu.com ~]# uname -a Linux aiezu.com 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux