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

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

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

1、通過 cat /proc/version 、uname

[python] view plain copy print?
  1. [[email protected]192.168.1.1 ~]# cat /proc/version 
  2. Linux version 2.6.32-279.el6.x86_64 ([email protected]) (gcc version 4.4.620120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
  3. [[email protected]
    192.168.1.1 ~]# uname -a
  4. Linux LAMP1.12.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
  5. [[email protected]192.168.1.1 ~]# uname -r
  6. 2.6.32-279.el6.x86_64  
  7. [[email protected]192.168.1.1 ~]#
[[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 [python] view plain copy print?
  1. [[email protected]192.168.1.1 ~]# cat /etc/issue
  2. CentOS release 6.3 (Final)  
  3. Kernel \r on an \m  
  4. [[email protected]192.168.1.1 ~]# cat /etc/redhat-release 
  5. CentOS release 6.3 (Final)  
  6. [[email protected]192.168.1.1 ~]#
[[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位: [python] view plain copy print?
  1. [[email protected]192.168.1.1 ~]# getconf LONG_BIT
  2. 64
  3. [[email protected]192.168.1.1 ~]
[[email protected] ~]# getconf LONG_BIT
64
[[email protected] ~]# 

4、使用 file /bin/ls [python] view plain copy print?
  1. [[email protected]192.168.1.1 ~]# file /bin/ls
  2. /bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped  
  3. [[email protected]192.168.1.1 ~]
[[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] ~]#