如何查看Linux操作系统版本

1. 查看内核版本命令:
360kb.com:~> cat /proc/version
Linux version 2.6.32-358.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013
360kb.com:~> uname -a
Linux 192.168.1.10 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
360kb.com:~> uname -r
2.6.32-358.el6.x86_64
2. 查看Linux版本:
1) 执行 lsb_release -a ,即可列出所有版本信息,例如:
360kb.com:/> 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
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 执行cat /etc/issue,例如如下:
360kb.com:/> cat /etc/issue
Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
3) 执行cat /etc/redhat-release ,例如如下:
360kb.com:/> cat /etc/*release*
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
CentOS release 6.4 (Final)
cpe:/o:centos:linux:6:GA

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。