Now the vast majority of users are using the Windows system, all know that the Windows system has 32-bit and 64-bit, in fact, the Linux system also has 32-bit and 64-bit, you know your Linux system is a few? Here's how you can use the shell to see if Linux is 32-bit or 64-bit.
Manually view the number of system digits
To view the number of Linux system digits, you can perform the following two commands individually
Used to get the number of digits in Word
The number of digits used to get long
For 64-bit systems above two commands should be 32 and 64 respectively.
To determine whether the Linux system is 32-bit or 64-bit has a lot of methods, recommended with getconf, however, some people think getconf word_bit=32 is 32bit,getconf word_bit=64 is 64bit, please go to 64bit machine execution, hehe. Getconf word_bit Show results or 32,why?
In a 32-bit system, the int and long types are typically 4 bytes, and the 64-bit system is of type int or 4 bytes, but long has become a 8-byte inux system that can be
Use "getconf word_bit" and "getconf long_bit" to get the digits of WORD and LONG
Shell determines the number of digits in the system
If [$ (getconf word_bit) = ' $ '] && [$ (getconf long_bit) = ' 64 ']; Then
Add some other way
32 bits: Linux localhost.localdomain 2.6.32-431.17.1.el6.i686 #1 SMP Wed May 7 20:52:21 UTC 2014 i686 i686 i386 gnu/linux
64 bits: Linux demolinux 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 19:59:55 UTC 2014 x86_64 x86_64 x86_64 gnu/linux
The above is the Linux use Shell to view the Linux32 bit and 64-bit method introduced, in addition to using the Shell view, you can also manually execute commands to view the number of system bits.