查看centos内核的版本:

1)[root@localhost ~]# cat /proc/version

Linux version 2.6.32-279.el6.i686 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 10:59:55 UTC 2012
2)

[root@localhost ~]# uname -a

Linux bogon 2.6.32-279.el6.i686 #1 SMP Fri Jun 22 10:59:55 UTC 2012 i686 i686 i386 GNU/Linux
 

3)

[root@localhost ~]# uname -r

2.6.32-279.el6.i686

2. 查看linux版本:

1) 列出所有版本信息,

[root@localhost ~]# lsb_release -a

LSB Version:    :core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch

Distributor ID:    CentOS

Description:    CentOS release 6.3 (Final)

Release:    6.3

Codename:    Final

注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。

2) 执行cat /etc/issue,例如如下:

[root@localhost ~]# cat /etc/issue

CentOS release 5.5 (Final)

Kernel r on an m

3) 执行cat /etc/redhat-release ,例如如下:

[root@localhost ~]# cat /etc/redhat-release

CentOS release 6.3 (Final)
Kernel \r on an \m
查看系统是64位还是32位:

1、getconf LONG_BIT or getconf WORD_BIT  亲测两个都可以!

[root@localhost ~]# getconf LONG_BIT

32

2、file /bin/ls

[root@localhost ~]# file /bin/ls

/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped

初学只是做个笔记,敲了一遍,都出来了。这是我pc上的centos。。。。。。。。。。。