如何查看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. APP接口自动化测试JAVA+TestNG(二)之TestNG简介与基础实例

    前言 继上篇环境篇后,本篇主要对TestNG进行介绍,给出最最基础的两个实例,通过本文后,学会并掌握TestNG测试用例的编写与运行,以及生成美化后的报告.下一篇为HTTP接口实战(国家气象局接口自动 ...

  2. VS2015 打开html 提示 未能完成操作 解决办法

    删除%LocalAppData%\Microsoft\VisualStudio\14.0\ComponentModelCache下所有文件,然后重启VS. 快捷键:Win + R,输入 %LocalA ...

  3. [Java 基础]基础语法

    Java代码基本规范 大小写敏感:Java是大小写敏感的,这就意味着标识符Hello与hello是不同的. 类名:对于所有的类来说,类名的首字母应该大写.如果类名由若干单词组成,那么每个单词的首字母应 ...

  4. grep命令详解

      用法格式 grep [option] pattern file   实验文件 [root@zejin240 tmp]# cat testdir/tfile 1 #include <stdio ...

  5. Python_Day_05 计数器(counter),有序字典(OrderDict),默认字典(defaultdict),可命名元祖(namedtuple),双向队列(deque),单项队列(deuqe.Queue)

    Counter(计数器) 是一个字典的子类,存储形式同样为字典,其中存储的键为字典的元素,值为元素出现的次数,在使用之前我们需要先导入文件 import collections 初始化一个计数器 im ...

  6. MVC学习系列12---验证系列之Fluent Validation

    前面两篇文章学习到了,服务端验证,和客户端的验证,但大家有没有发现,这两种验证各自都有弊端,服务器端的验证,验证的逻辑和代码的逻辑混合在一起了,如果代码量很大的话,以后维护扩展起来,就不是很方便.而客 ...

  7. WP7 手机软件纪念 - 稍后读软件

    在本月换机之际,决定写篇博客纪念一下我在 WP7 手机上开发的一个稍后读软件.这个工具开发完成后,两年间,我的 WP7 手机 80% 的用途,都发挥在了它身上. 这个软件其实是一个离线阅读工具,非常类 ...

  8. 初入网络系列笔记(4)HTTP请求和响应

    一.借鉴说明,本博文借鉴以下博文 1.starok,HTTP必知必会,http://www.cnblogs.com/starstone/p/4890409.html 2.CareySon,HTTP协议 ...

  9. autocad2008+C#2008开发中设置自动加载dll

    一.复制编译后的dlll路径,比如我的是D:\zjy\cad开发\学习\宗地图\bin\Debug\zd.dll 二.随便找个地方新建一个记事本,在记事本中写入以下内容: (command " ...

  10. C#中对象,字符串,dataTable、DataReader、DataSet,对象集合转换成Json字符串方法。

    C#中对象,字符串,dataTable.DataReader.DataSet,对象集合转换成Json字符串方法. public class ConvertJson { #region 私有方法 /// ...