查看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 2005linux

/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/Linuxui

chen@mylinuxserver:/proc> uname -r
2.6.5-7.244-smpspa

uname命令的做用?server

2. 查看Linux版本:ip

1) 登陸到服務器執行 lsb_release -a ,便可列出全部版本信息,例如:get

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/aio

注:這個命令適用於全部的linux,包括Redhat、SuSE、Debian等發行版。登錄

2) 登陸到linux執行cat /etc/issue,例如以下:gcc

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

相關文章
相關標籤/搜索