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
文档出处:http://yulp2010.blog.51cto.com/983828/317398
阅读(2294) | 评论(0) | 转发(0) |