Home > Operation and Maintenance > CentOS > How to check whether the centos system version is 32-bit or 64-bit

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

王林
Release: 2020-03-16 11:16:52
Original
3965 people have browsed it

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

1.

[root@linuxzgf ~]#getconf LONG_BIT
[root@linuxzgf ~]#getconf WORD_BIT
Copy after login

(In 32-bit systems, the int type and long type are generally 4 bytes. In 64-bit systems, the int type is still 4 bytes, but long has become 8 bytes. In Linux systems, you can use "getconf WORD_BIT" and "getconf LONG_BIT" to obtain the number of word and long digits. In 64-bit systems, you should get 32 ​​and 64 respectively.)

(Recommended tutorial: centos usage tutorial)

2.

[root@linuxzgf ~]#uname -a
Copy after login

If there is x86_64, it is 64-bit, if not, it is 32-bit; the following If it is X686 or A 64-bit system will have two directories, /lib64 and /lib, while a 32-bit system will have only /lib.

Four,

[root@linuxzgf ~]#file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
Copy after login

32-bit is 32-bit Linux, if it is 64-bit, the display is 64-bit


Five,

[root@linuxzgf ~]#file /bin/cat
/bin/cat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
Copy after login

32-bit is 32-bit linux. If it is 64-bit, the display is 64-bit


6.

[root@linuxzgf ~]#uname -m
x86_64
3.# arch
x86_64
i686
Copy after login
Related video tutorial recommendations :

linux video tutorial

The above is the detailed content of How to check whether the centos system version is 32-bit or 64-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