如何查看Linux操做系统版本?

如何查看Linux操做系统版本?

1. 查看内核版本命令:
chen@mylinuxserver:~> cat /proc/version
Linux version 2.6.5-7.244-smp ( geeko@buildhost) (gcc version 3.3.3 (SuSE Linux)) #1 SMP Mon Dec 12 18:32:25 UTC 2005
/proc 目录的做用?
chen@mylinuxserver:/proc> uname -a
Linux mylinuxserver 2.6.5-7.244-smp #1 SMP Mon Dec 12 18:32:25 UTC 2005 i686 i686 i386 GNU/Linux
chen@mylinuxserver:/proc> uname -r
2.6.5-7.244-smp
uname命令的做用?
2. 查看Linux版本:
1) 登陆到服务器执行 lsb_release -a ,便可列出全部版本信息,例如:
chen@mylinuxserver:/proc> 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) 登陆到linux执行cat /etc/issue,例如以下:
chen@mylinuxserver:/proc> cat /etc/issue
Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
3) 登陆到linux执行cat /etc/redhat-release ,例如以下:
chen@mylinuxserver:/proc> cat /etc/*release* LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32" cat: /etc/lsb-release.d: 是一个目录 SUSE LINUX Enterprise Server 9 (i586) VERSION = 9 PATCHLEVEL = 3
相关文章
相关标签/搜索