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

Determine whether linux is 64-bit or 32-bit

王林
王林Original
2019-11-05 09:44:593770browse

Determine whether linux is 64-bit or 32-bit

Method 1:

getconf LONG_BIT

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

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

[root@localhost ~]# getconf LONG_BIT
64

Method 2:

uname -a

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

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

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!

Statement:
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
Previous article:what does for linux meanNext article:what does for linux mean