分类: LINUX
2009-03-30 16:43:04
1. 查看内核版本命令:
1)# cat /proc/version
Linux version 2.6.9-78.ELsmp (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Wed Jul 9 15:46:26 EDT 2008
2)# uname -a
Linux ODSETL01 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:46:26 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
2. 查看linux版本:
1) 登录到服务器执行 lsb_release -a ,即可列出所有版本信息,例如:
# lsb_release -a
LSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-ia32:graphics-3.0-noarch
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 7)
Release: 4
Codename: NahantUpdate7
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2) 登录到linux执行cat /etc/issue,例如如下:
# cat /etc/issue
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Kernel \r on an \m
3) 登录到linux执行cat /etc/redhat-release ,例如如下:
# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
注:这种方式下可以直接看到具体的版本号,比如 AS4 Update 4
4) 登录到linux执行rpm -q redhat-release ,例如如下:
# rpm -q redhat-release