03-centos 如何檢視作業系統是哪個版本
阿新 • • 發佈:2018-12-27
centos 檢視作業系統版本資訊主要有以下幾種方式:
1、通過 cat /proc/version 、uname
[python] view plain copy print?- [[email protected]192.168.1.1 ~]# cat /proc/version
- 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
- [[email protected]
- 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
- [[email protected]192.168.1.1 ~]# uname -r
- 2.6.32-279.el6.x86_64
- [[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?- [[email protected]192.168.1.1 ~]# cat /etc/issue
- CentOS release 6.3 (Final)
- Kernel \r on an \m
- [[email protected]192.168.1.1 ~]# cat /etc/redhat-release
- CentOS release 6.3 (Final)
- [[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?
- [[email protected]192.168.1.1 ~]# getconf LONG_BIT
- 64
- [[email protected]192.168.1.1 ~]#
[[email protected] ~]# getconf LONG_BIT
64
[[email protected] ~]#
4、使用 file /bin/ls [python] view plain copy print?
- [[email protected]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
- [[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] ~]#