1. 查看內核版本命令:linux
$ cat /proc/version Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013 $ 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 $ uname -r 2.6.32-358.el6.x86_64
2. 查看Linux版本:
1) 執行 lsb_release -a ,便可列出全部版本信息,例如:centos
$ 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,例如以下:bash
$ cat /etc/issue Welcome to SUSE LINUX Enterprise Server 9 (i586) - Kernel \r (\l).
3) 執行cat /etc/redhat-release ,例如以下:ui
$ cat /etc/*release* CentOS release 6.4 (Final) CentOS release 6.4 (Final) CentOS release 6.4 (Final) cpe:/o:centos:linux:6:GA其餘# getconf LONG_BIT (Linux查看版本說明當前CPU運行在32bit模式下, 但不表明CPU不支持64bit)# cat /proc/cpuinfo (Linux查看cpu相關信息,包括型號、主頻、內核信息等# uname -a (Linux查看版本當前操做系統內核信息)# cat /proc/version (Linux查看當前操做系統版本信息)