How does linux check whether it is 64-bit or 32-bit?
How does linux check whether it is 64-bit or 32-bit? In view of this problem, this article introduces the corresponding analysis and answers in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.
Method 1:
Getconf LONG_BIT
Enter the getconf LONG_BIT command in the linux terminal, and if it is a 32-bit machine, the result is 32.
For example:
[root@localhost ~] # getconf LONG_BIT32
If it is a 64-bit machine, the result is 64.
[root@localhost ~] # getconf LONG_BIT64
Method 2:
Uname-a
If it is a 64-bit machine, it will output x86x64.
[chenzhou@testweb01 ~] $uname-aLinux testweb01 2.6.18-308.4.1.el5 # 1 SMP Tue Apr 17 17:08:00 EDT 2012 x86 "64 GNU/Linux
You can see that the output of x86x64 after uname-an execution indicates that the machine is 64-bit, otherwise it means that the machine is 32-bit.
[root@localhost] # uname-aLinux localhost.localdomain 2.6.18-164.el5 # 1 SMP Tue Aug 18 15:51:54 EDT 2009 i686 i686 i386 GNU/Linux on how to check linux is 64-bit or 32-bit questions are shared here. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.