Home > Operation and Maintenance > CentOS > How to check the number of bits of the system in centos

How to check the number of bits of the system in centos

青灯夜游
Release: 2022-03-03 18:20:03
Original
6002 people have browsed it

View method: 1. Use the "getconf LONG_BIT" command; 2. Use the "getconf WORD_BIT" command; 3. Use the "file /bin/ls" command. If "32-bit" appears in the output information, then It is 32-bit, if "64-bit" appears, it is 64-bit.

How to check the number of bits of the system in centos

#The operating environment of this tutorial: centos7 system, thinkpad t480 computer.

How to check how many bits the system is in centos (32-bit or 64-bit)

Int type in 32-bit system and long types are generally 4 bytes. In 64-bit systems, the int type is still 4 bytes, but long has become 8 bytes.

In Linux systems, "getconf WORD_BIT" and "getconf LONG_BIT" can be used to obtain the number of digits of word and long.

You should get 32 ​​and 64 respectively on 64-bit systems.

getconf LONG_BIT

[root@localhost ~]# getconf LONG_BIT
64
Copy after login

getconf WORD_BIT

[root@localhost ~]# getconf WORD_BIT
32
Copy after login

file /bin/ls

[root@localhost ~]# 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
Copy after login

You can seeELF 64-bit LSB So the system is 64-bit

Recommended: "centos usage tutorial"

The above is the detailed content of How to check the number of bits of the system in centos. 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