centos 如何选择版本升级(centos系统怎么查看当前版本)

1、使用LSB_release -a命令查看,我来为大家讲解一下关于centos 如何选择版本升级?跟着小编一起来看一看吧!

centos 如何选择版本升级(centos系统怎么查看当前版本)

centos 如何选择版本升级

查看centos系统版本的方法:

1、使用LSB_release -a命令查看

[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命令打开文件查看

[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)命令查看

[root@centos6 ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@centos7 app]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)

4、使用rpm -q centos-release命令查看

[root@centos6 ~]# rpm -q centos-release centos-release-6-9.el6.12.3.x86_64 [root@centos7 app]# rpm -q centos-release centos-release-7-3.1611.el7.centos.x86_64

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页