centos 如何查看操作系统是哪个版本

2019-04-18  本文已影响0人  Medicine_8d60

centos 查看操作系统版本信息主要有以下几种方式:

1、通过 cat /proc/version 、uname

[root@192.168.1.1 ~]# cat /proc/version 
Linux version 2.6.32-279.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Fri Jun 22 12:19:21 UTC 2012
[root@192.168.1.1 ~]# 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
[root@192.168.1.1 ~]# uname -r
2.6.32-279.el6.x86_64
[root@192.168.1.1 ~]#

2、通过cat /etc/issue 、cat /etc/redhat-release

[root@192.168.1.1 ~]# cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m
 
[root@192.168.1.1 ~]# cat /etc/redhat-release 
CentOS release 6.3 (Final)
[root@192.168.1.1 ~]#

3、查看64位还是32位:

[root@192.168.1.1 ~]# getconf LONG_BIT
64
[root@192.168.1.1 ~]# 

4、使用 file /bin/ls

[root@192.168.1.1 ~]# 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
[root@192.168.1.1 ~]# 

转载自: https://blog.csdn.net/Hu_wen/article/details/60768918

上一篇下一篇

猜你喜欢

热点阅读