查看linux版本号的几种方法
(1)lsb_release 命令查看,FSG(Free Standards Group)组织开发的LSB (Linux Standard Base)标准的一个命令,用来查看linux兼容性的发行版信息
[root@enmoteam1 oracle]# lsb_release -h
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.
Options:
-v, --version
Display the version of the LSB specification against which the distribution is compliant.
-i, --id
Display the string id of the distributor.
-d, --description
Display the single line text description of the distribution.
-r, --release
Display the release number of the distribution.
-c, --codename
Display the codename according to the distribution release.
-a, --all
Display all of the above information.
-s, --short
Use short output format for information requested by other options (or version if none).
-h, --help
Display this message.
[root@enmoteam1 oracle]# lsb_release -v
LSB Version: :core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@enmoteam1 oracle]# lsb_release -i
Distributor ID: RedHatEnterpriseServer
[root@enmoteam1 oracle]# lsb_release -d
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
[root@enmoteam1 oracle]# c
-bash: c: command not found
[root@enmoteam1 oracle]# lsb_release -c
Codename: Santiago
[root@enmoteam1 oracle]# lsb_release -a
LSB Version: :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: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.3 (Santiago)
Release: 6.3
Codename: Santiago
[root@enmoteam1 oracle]# lsb_release -s
:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
[root@enmoteam1 oracle]#
(2)/etc/issue查看,是系统安装时默认的发行版本号信息。通常安装好系统后文件内容不会发生变化
[root@enmoteam1 oracle]# cat /etc/issue
Oracle Linux Server release 6.3
Kernel \r on an \m
[root@enmoteam1 oracle]#
(3)/proc/version 和 uname -a 显示的内容同样,显示linux内核版本。
[root@enmoteam1 oracle]# cat /proc/version
Linux version 2.6.39-200.24.1.el6uek.x86_64 (mockbuild@ca-build44.us.oracle.com) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Sat Jun 23 02:39:07 EDT 2012
[root@enmoteam1 oracle]# uname -r
2.6.39-200.24.1.el6uek.x86_64
[root@enmoteam1 oracle]# uname -a
Linux enmoteam1 2.6.39-200.24.1.el6uek.x86_64 #1 SMP Sat Jun 23 02:39:07 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@enmoteam1 oracle]#
(4)/etc/redhat-release能够看到详细的版本
[oracle@enmoteam1 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[oracle@enmoteam1 ~]$
查看linux版本号的几种方法的更多相关文章
- 查看Laravel版本号的三种方法
1:最简单的用命令行实现 php artisan --version 2:查看文件 vendor\laravel\framework\src\Illuminate\Foundation\Applica ...
- 如何查看Laravel版本号的三种方法
1.PHP artisan --version 2.vim vendor/laravel/framework/src/Illuminate/Foundation/Application.php 3:可 ...
- Linux下查看线程数的几种方法汇总
Linux下查看线程数的几种方法汇总 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.Linux下查看某个进程的线程数量 pstree命令以树状图显示进程间的关系(display ...
- Linux下查看磁盘挂载的几种方法
Linux下查看磁盘挂载的几种方法 第一种方法:df命令 # df -hT Filesystem Type Size Used Avail Use% Mounted on devtmpfs devtm ...
- Linux下查看磁盘挂载的三种方法
Linux下查看磁盘挂载的三种方法 2009-06-05 23:17 好久没有更新日志了,呵呵.不是没有要写的东东.实在抽不出时间来写,要准备公司的考试呢,C++考试.已经有七个月没有写C++代码了, ...
- linux下查看mysql版本的四种方法
Linux查看MySQL版本的四种方法 1 在终端下执行 mysql -V 2 在help中查找 mysql --help |grep Distrib 3 在mysql 里查看 select vers ...
- linux安装IPython四种方法
IPython是Python的交互式Shell,提供了代码自动补完,自动缩进,高亮显示,执行Shell命令等非常有用的特性.特别是它的代码补完功能,例如:在输入zlib.之后按下Tab键,IPytho ...
- linux 时间同步的2种方法(转)
linux 时间同步的2种方法 张映 发表于 2012-10-23 分类目录: 服务器相关 标签:linux, ntp, 同步, 时间服务器 由于硬件的原因,机器或多或少的根标准时间对不上,一个月的误 ...
- ubuntu查看mysql版本的几种方法
ubuntu查看mysql版本的几种方法 mysql 1:在终端下:mysql -V(大写) //代码 $ mysql -V mysql Ver 14.14 Distrib 5.5.46, for d ...
随机推荐
- 抓取锁的sql语句-第四次修改
--完成情况 变量V_BLOCKING_SID 用来动态抓取 产生锁的会话id,输出参数没有任何问题,但是执行报错 标识符无效! CREATE OR REPLACE PROCEDURE SOLV ...
- App Store审核指南(中文版)2010版
前言 感谢您付出宝贵的才华与时间来开发iOS应用程程序.从职业与报酬的角度而言,这对于成千上万的开发员来说一直都是一项值得投入的事业.我们希望帮助您加入这个成功的组织.这是我们首次发布<应用程序 ...
- iOS GorupBy
转自: IOS 数组分组 Grouped NSArray 1 2 3 4 5 6 7 8 NSMutableSet *set=[NSMutableSet set]; [_list enumera ...
- POJ 1155 树形背包(DP) TELE
题目链接: POJ 1155 TELE 分析: 用dp[i][j]表示在结点i下最j个用户公司的收益, 做为背包处理. dp[cnt][i+j] = max( dp[cnt][i+j ...
- GitHub-修改以下host-ip可加快访问速度
#GitHub START 207.97.227.239 github.com 204.232.175.94 gist.github.com 107.21.116.220 help. ...
- 【转载】如何学习javascript
如何学习Javascript 作者: chaomao 首先要说明的是,咱现在不是高手,最多还是一个半桶水,算是入了JS的门. 谈不上经验,都是一些教训. 这个时候有人要说,“靠,你丫半桶水,凭啥教我 ...
- 修改本地数据库root权限密码
方法1: 用SET PASSWORD命令 测试成功 首先登录MySQL @1——mysql DOS 窗口中. 格式:mysql> set password for 用户名@localhost = ...
- java 获取页面中的 a 标签 的 href 实例
Pattern p = Pattern.compile("<a\\s+href\\s*=\\s*(\"|\')?(.*?)[\"|\'|>]", P ...
- python运维开发之第三天
一.第二天课程的复习总结 1.列表可以增删改查,元组是不可修改的列表,字符串是不可以修改的. 2.列表,元组是有序的,字典是无序的,字典的key唯一 3.列表字典可以嵌套列表,可以嵌套字典,可以嵌套多 ...
- C语言初学 数组 打印菱形
#include<stdio.h> #include<stdlib.h> int main() { int n,i,j; printf("---开始打印符号--\n& ...