查看linux 版本的常见方法(怎么查看Linux的版本)

2023-11-30 0 831

Linux有众多版本,那么该如何查看Linux具体的版本呢?网上罗列了一下,大致有3种方法,具体教程如下:

①登录到服务器执行lsb_release-a,即可列出所有版本信息,例如:

[root@3.5.5Biz-46~]#lsb_release-a

LSBVersion:1.3

DistributorID:RedHatEnterpriseAS

Description:RedHatEnterpriseLinuxASrelease4(NahantUpdate1)

Release:4

Codename:NahantUpdate1

[root@3.5.5Biz-46~]#

这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。

②登录到linux执行cat/etc/redhat-release,例如如下:

[root@3.5.5Biz-46~]#cat/etc/redhat-release

RedHatEnterpriseLinuxASrelease4(NahantUpdate1)

[root@3.5.5Biz-46~]#

这种方式下可以直接看到具体的版本号,比如AS4Update1

③登录到linux执行rpm-qredhat-release,例如如下

[root@3.5.5Biz-46~]#rpm-qredhat-release

redhat-release-4AS-2.4

[root@3.5.5Biz-46~]#

这种方式下可看到一个所谓的release号,比如上边的例子是2.4

这个release号和实际的版本之间存在一定的对应关系,如下:

redhat-release-3AS-1- RedhatEnterpriseLinuxAS3

redhat-release-3AS-7.4- RedhatEnterpriseLinuxAS3Update4

redhat-release-4AS-2- RedhatEnterpriseLinuxAS4

redhat-release-4AS-2.4- RedhatEnterpriseLinuxAS4Update1

redhat-release-4AS-3- RedhatEnterpriseLinuxAS4Update2

redhat-release-4AS-4.1- RedhatEnterpriseLinuxAS4Update3

redhat-release-4AS-5.5- RedhatEnterpriseLinuxAS4Update4

注意:第(2)(3)两种方法只对RedhatLinux有效

来源:qy.cn/zx/idc/807.html

本站声明:内容来源于网络,内容不代表本站立场,仅供阅读参考,文章版权归原作者“本公司cmy.cn”所有。如有侵权,请联系我们删除。

免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们56dr_com,同时欢迎投稿传递力量。

本文从“特网科技(56dr.com)”转载,原作者保留一切权利,若侵权请联系删除。

相关文章

猜你喜欢
官方客服团队

为您解决烦忧 - 24小时在线 专业服务

  • 0 +

    访问总数

  • 0 +

    会员总数

  • 0 +

    文章总数

  • 0 +

    今日发布

  • 0 +

    本周发布

  • 4975 +

    运行天数

你的前景,远超我们想象