How to check whether the centos system version is 64-bit or 32-bit

王林
Release: 2020-05-17 09:30:32
Original
2960 people have browsed it

How to check whether the centos system version is 64-bit or 32-bit

查看linux机器是32位还是64位的方法:

file /sbin/init
Copy after login

或者

file /bin/ls
Copy after login

输出结果:

/sbin/init: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
Copy after login

如果显示 64-bit 则为64位;

file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
Copy after login

如果显示为32 bit 则为32bit;

uname -a:
uname -a
Linux pmx002**.**.**  2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Copy after login

x86_64表示64位机器

uname -a
Linux pmx0**.**.**    2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
Copy after login

i686表示32位机器

i686 只是i386的一个子集,支持的cpu从Pentium 2 (686)开始,之前的型号不支持.

推荐教程:centos教程

The above is the detailed content of How to check whether the centos system version is 64-bit or 32-bit. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!