Home > Operation and Maintenance > Linux Operation and Maintenance > Determine whether linux is 64-bit or 32-bit

Determine whether linux is 64-bit or 32-bit

王林
Release: 2019-11-05 18:01:12
Original
3848 people have browsed it

Determine whether linux is 64-bit or 32-bit

Method 1:

getconf LONG_BIT
Copy after login

Enter the getconf LONG_BIT command in the Linux terminal. If it is a 32-bit machine, the result will be 32.

For example:

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

If it is a 64-bit machine, the result is 64.

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

Method 2:

uname -a
Copy after login

If it is a 64-bit machine, x86_64 will be output.

[chenzhou@testweb01 ~]$ uname -a
Linux testweb01 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:00 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Copy after login

You can see that x86_64 is output in the execution result of uname-a, indicating that the machine is 64-bit, otherwise it means that the machine is 32-bit.

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux
Copy after login

Recommended tutorial: linux tutorial

The above is the detailed content of Determine whether linux 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