神剑山庄资源网 Design By www.hcban.com
如何查看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
标签:
Linux,版本

神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网 免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com

评论“查看Linux系统版本信息的方法小结”

暂无查看Linux系统版本信息的方法小结的评论...

《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线

暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。

艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。

《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。