如何查看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/issue

Oracle Linux Server release 5.7

Kernel \r on an \m

1.2 Centos Linux

[root@Centos2 ~]# more /etc/issue

CentOS release 6.4 (Final)

Kernel \r on an \m

1.3 RedHat Linux

[root@getlnx05 ~]# more /etc/issue

Red 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版本信息的更多相关文章

  1. Linux学习笔记之查看Linux版本信息

    0x00 概述 这里所谓的Linux版本信息,包括Linux内核版本信息和Linux系统版本信息. 0x01 查看Linux内核版本信息 方法1:登陆Linux,在终端输入 cat /proc/ver ...

  2. 如何查看linux版本信息

    查看系统信息 [root@root]# hostnamectl Static hostname: root Icon name: computer-desktop Chassis: desktop M ...

  3. [转]查看Linux版本信息

    一.查看Linux内核版本命令(两种方法): 1.cat /proc/version [root@S-CentOS home]# cat /proc/version Linux version 2.6 ...

  4. 用lsb_release -a 查看linux版本

    1.要通过yum 安装上这个命令的软件包 yum -y install redhat-lsb 2.lsb_release -a 查看linux版本信息

  5. linux查看操作系统版本信息

    linux查看操作系统版本信息  摘自:https://www.cnblogs.com/vaelailai/p/7545166.html 一.linux下如何查看已安装的centos版本信息: 1.L ...

  6. Linux 查看Tomcat版本信息

    Linux 查看Tomcat版本信息 如果我们想运行在 Linux 下的 Tomcat 版本信息,只需要在 Tomcat 的 bin/ 目录下,运行 version.sh 脚本即可. 1.使用如下命令 ...

  7. Linux 查看操作系统版本信息 uname

    Linux 查看操作系统版本信息 uname uname 命令用于显示当前系统的版本信息. 带 -a 选项的 uname 命令会给出当前操作系统的所有有用信息. 命令如下: [root@node1 / ...

  8. 查看linux版本

    http://nameyjj.blog.51cto.com/788669/557424 1. 查看内核版本命令: 1) [root@q1test01 ~]# cat /proc/version     ...

  9. Ubuntu下查看linux版本,内核版本,系统位数,gcc版本

    1. 查看linux版本  sunny@ubuntu:~$cat /etc/issueUbuntu 11.04 \n \l 2. 查看内核版本1) sunny@ubuntu:~$ cat /proc/ ...

随机推荐

  1. 正则匹配抓取input 隐藏输入项和 <td>标签内的内容

    这里不多作解释了,只要提供方法,如果想了解正则匹配,就去百度. 第一条是,匹配出所有的隐藏输入域 $patern = "/<input(.*?)type=\"hidden\& ...

  2. Machine Learning

    Recently, I am studying Maching Learning which is our course. My English is not good but this course ...

  3. (三)WebGIS前端地图显示之根据地理范围换算出瓦片行列号的原理(核心)

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/. 1.前言 在上一节中我们知道了屏幕上一像素等于实际中多少单位长度(米或 ...

  4. WCF局域网内使用代理无法访问解决方法

    问题描述 在大部分事业单位上网都是需要使用代理的,前几天带着一个同事写的程序过来部署,部署以后各个客户端通过WCF相互通讯,那么其中一个地方在本地局域网测试是没有问题的. 后发现一部分是原因是由于代理 ...

  5. xml html entity 列表

    Name Character Unicode code point (decimal) Standard Description quot " U+0022 (34) XML 1.0 dou ...

  6. python之初体验

    1. Python简介: Python(英国发音:/ˈpaɪθən/ 美国发音:/ˈpaɪθɑːn/), 是一种面向对象.解释型计算机程序设计语言,由Guido van Rossum于1989年发明, ...

  7. centos yum Segmentation fault 问题解决办法

    今儿在centos 使用yum 安装软件时出现了 ”Segmentation fault“ 错误提示,google一大把执行 yum clean all 命令后,再执行还是没用,最后把 zlib.x. ...

  8. 设计一个自动生成棋盘格子的JS小程序

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. 对kinderEditor 的空内容进行验证

    var con = document.getElementById(item.Id).value; var a = con.replace(/( )|[ ]|(<p>)|(<\/p& ...

  10. C#图片处理常见方法性能比较

    C#图片处理常见方法性能比较 来自:http://www.cnblogs.com/sndnnlfhvk/archive/2012/02/27/2370643.html   在.NET编程中,由于GDI ...