查看LINUX版本命令
时间:2016-6-15 | 作者:楼台听枫雨 | 分类:linux技术部 | 评论(0) | 浏览(2354) | uedbet最新网站: linux version
1. 查看内核版本命令:
[root@server1 Desktop]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013
[root@server1 Desktop]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013
[root@server1 Desktop]# uname -a
Linux server1.org 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Linux server1.org 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@server1 Desktop]# uname -r
2.6.5-7.244-smp
2.6.5-7.244-smp
2. 查看Linux版本:
1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:
[root@server1 Desktop]# lsb_release -a
LSB Version: core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: SUSE LINUX
Description: SUSE LINUX Enterprise Server 9 (i586)
Release: 9
Codename: n/a
LSB Version: core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: SUSE LINUX
Description: SUSE LINUX Enterprise Server 9 (i586)
Release: 9
Codename: n/a
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 登录到linux执行cat /etc/issue,例如如下:
[root@server1 Desktop]# cat /etc/issue
Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
3) 登录到linux执行cat /etc/redhat-release ,例如如下:
[root@server1 Desktop]# 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
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
cpe:/o:centos:linux:6:GA
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
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
cpe:/o:centos:linux:6:GA
本文固定链接:http://www.fengtec.net/?post=30
本文由楼台听枫雨原创或编辑,互联分享,尊重版权,转载请以链接形式标明本文地址
本文由楼台听枫雨原创或编辑,互联分享,尊重版权,转载请以链接形式标明本文地址
你可能感兴趣的话题
发表评论: