Check whether the CentOS system version is 32-bit or 64-bit
I,
[Root @ linuxzgf ~] # Getconf LONG_BIT
[Root @ linuxzgf ~] # Getconf WORD_BIT
(In 32-bit systems, the int and long types are generally 4 bytes. In 64-bit systems, the int type is 4 bytes, however, long has been changed to 8-byte inux. "getconf WORD_BIT" and "getconf LONG_BIT" can be used to obtain the number of digits of word and long. In a 64-bit system, the values are 32 and 64 respectively .)
II,
[Root @ linuxzgf ~] # Uname-
If x86_64 is 64-bit, no is 32-bit.
When X686 or X86_64 is followed, the kernel is 64-bit, and i686 or i386 is 32-bit.
III,
Check whether the/lib64 directory is available. The 64-bit system has two directories:/lib64 and/lib. The 32-bit system has only one directory.
IV,
[Root @ linuxzgf ~] # File/sbin/init
/Sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs ), for GNU/Linux 2.6.9, stripped
32-bit is a 32-bit linux. If it is 64-bit, 64-bit is displayed.
V,
[Root @ linuxzgf ~] # File/bin/cat
/Bin/cat: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs ), for GNU/Linux 2.6.9, stripped
32-bit is a 32-bit linux. If it is 64-bit, 64-bit is displayed.
VI,
[Root @ linuxzgf ~] # Uname-m
X86_64
3. # arch
X86_64
I686
7. Check the number of CPUs
[Root @ linuxzgf ~] # More/proc/cpuinfo
8,
[Root @ linuxzgf ~] # Echo $ HOSTTYPE
X86_64
The getconf command can also obtain basic system configuration information, such as the number of operating systems, memory size, and disk size.
$ Getconf-a: detailed system information is displayed.