如何查看Linux系统使用的版本信息呢? 下面这篇文章收集、整理了一些常见的查看Linux系统版本的方法。由于手头只有Oracle Linux、Centos Linux、Redhat Linux三个版本Linux,所以像Debian、Ubuntu之类的Linux系统,下面方法在这些版本都没测试过。
1:more /etc/issue 命令查看
1.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# more /etc/issueOracle Linux Server release 5.7Kernel \r on an \m
1.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# more /etc/issueCentOS release 6.4 (Final)Kernel \r on an \m
1.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# more /etc/issueRed Hat Enterprise Linux Server release 5.7 (Tikanga)Kernel \r on an \m
2: lsb_release -a 命令查看
2.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Release: 5.7
Codename: Carthage
2.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# 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.4 (Final)
Release: 6.4
Codename: Final
2.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Release: 5.7
Codename: Tikanga
3:cat /etc/redhat-release 命令查看
这个命令应该只有部分Linux可以查看,不是所有版本Linux都可以使用该命令
3.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@DB-Server etc]# cat /etc/*release
Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Oracle Linux Server release 5.7
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@DB-Server etc]# ls /etc/*lease
/etc/enterprise-release /etc/oracle-release /etc/redhat-release
[root@DB-Server etc]#
3.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@Centos2 ~]# cat /etc/*release
CentOS release 6.4 (Final)
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
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
[root@Centos2 ~]# ls /etc/*release
/etc/centos-release /etc/lsb-release /etc/redhat-release /etc/system-release
[root@Centos2 ~]#
3.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@getlnx05 ~]# cat /etc/*release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@getlnx05 ~]# ls /etc/*release
/etc/redhat-release
[root@getlnx05 ~]#
4 rpm -q redhat-release命令查看,只适用于Redhat Linux
复制代码代码如下:
[root@getlnx05 ~]# rpm -q redhat-release
redhat-release-5Server-5.7.0.3
1:more /etc/issue 命令查看
1.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# more /etc/issueOracle Linux Server release 5.7Kernel \r on an \m
1.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# more /etc/issueCentOS release 6.4 (Final)Kernel \r on an \m
1.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# more /etc/issueRed Hat Enterprise Linux Server release 5.7 (Tikanga)Kernel \r on an \m
2: lsb_release -a 命令查看
2.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Release: 5.7
Codename: Carthage
2.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# 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.4 (Final)
Release: 6.4
Codename: Final
2.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Release: 5.7
Codename: Tikanga
3:cat /etc/redhat-release 命令查看
这个命令应该只有部分Linux可以查看,不是所有版本Linux都可以使用该命令
3.1 Oracle Linux
复制代码代码如下:
[root@DB-Server ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@DB-Server etc]# cat /etc/*release
Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Oracle Linux Server release 5.7
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@DB-Server etc]# ls /etc/*lease
/etc/enterprise-release /etc/oracle-release /etc/redhat-release
[root@DB-Server etc]#
3.2 Centos Linux
复制代码代码如下:
[root@Centos2 ~]# cat /etc/redhat-release
CentOS release 6.4 (Final)
[root@Centos2 ~]# cat /etc/*release
CentOS release 6.4 (Final)
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
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
[root@Centos2 ~]# ls /etc/*release
/etc/centos-release /etc/lsb-release /etc/redhat-release /etc/system-release
[root@Centos2 ~]#
3.3 RedHat Linux
复制代码代码如下:
[root@getlnx05 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@getlnx05 ~]# cat /etc/*release
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@getlnx05 ~]# ls /etc/*release
/etc/redhat-release
[root@getlnx05 ~]#
4 rpm -q redhat-release命令查看,只适用于Redhat Linux
复制代码代码如下:
[root@getlnx05 ~]# rpm -q redhat-release
redhat-release-5Server-5.7.0.3
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com
暂无评论...
更新日志
2024年11月18日
2024年11月18日
- 群星《亚洲故事香港纯弦》雨果UPMAGCD2024[低速原抓WAV+CUE]
- 群星《经典咏流传》限量1:1母盘直刻[低速原抓WAV+CUE]
- 庾澄庆1993《老实情歌》福茂唱片[WAV+CUE][1G]
- 许巍《在别处》美卡首版[WAV+CUE][1G]
- 林子祥《单手拍掌》华纳香港版[WAV+CUE][1G]
- 郑秀文.1997-我们的主题曲【华纳】【WAV+CUE】
- 群星.2001-生命因爱动听电影原创音乐AVCD【MEDIA】【WAV+CUE】
- 林志颖.1994-别了晴雨的回忆【飞碟】【WAV+CUE】
- 群星《经典咏流传2》限量1:1母盘直刻[低速原抓WAV+CUE]
- 【蓝卡唱片】卫海霞《乐海霞音珍藏版》WAV分轨
- 杨小琳《金装杨小琳》24K金碟特别版[低速原抓WAV+CUE]
- 群星《国风超有戏 第8期》[320K/MP3][30.32MB]
- 群星《国风超有戏 第8期》[FLAC/分轨][157.37MB]
- 群星《说唱梦工厂 第10期》[320K/MP3][99.5MB]
- 李嘉.1996-思念过秋冬【点将】【WAV+CUE】