1. 程式人生 > >centos 如何檢視作業系統是哪個版本

centos 如何檢視作業系統是哪個版本

centos 檢視作業系統版本資訊主要有以下幾種方式:

1、通過 cat /proc/version 、uname

[[email protected] ~]# cat /proc/version 
Linux version 2.6.32-279.el6.x86_64 ([email protected]) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
[[email protected] ~]# uname -a
Linux LAMP1.1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
[
[email protected]
~]# uname -r 2.6.32-279.el6.x86_64 [[email protected] ~]#
2、通過cat /etc/issue 、cat /etc/redhat-release
[[email protected] ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

[[email protected] ~]# cat /etc/redhat-release 
CentOS release 6.3 (Final)
[[email protected]
~]#

3、檢視64位還是32位:
[[email protected] ~]# getconf LONG_BIT
64
[[email protected] ~]# 

4、使用 file /bin/ls
[[email protected] ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
[[email protected] ~]#