Some times it is very important to know whether the Server's cpu Architecture is of 32 bit or 64 bit. One can determine using the file /proc/cpuinfo , as shown below :
[root@localhost ~]# cat /proc/cpuinfo | grep -i flags
flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx rdtscp lm constant_tsc up rep_good pni monitor ssse3 lahf_lm
Different Modes of CPU :
lm : Long Mode (64 bit)
tm : Transparent Mode ( 32 bit)
rm : Real Mode (16 bit)
So per the above output Server's CPU is of 64 bit.
Determine whether a given Linux is 32 bit or 64 bit?
We can find the whether linux is 32 bit or 64 bit using below Commands :
[root@localhost ~]# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 37
Stepping: 5
CPU MHz: 933.000
BogoMIPS: 4787.82
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 3072K
NUMA node0 CPU(s): 0-3
[root@localhost ~]# uname -m
x86_64
x86_64 –> 64-bit kernel
i686 –> 32-bit kernel
Above Command will display whether Kernal Version is 32 bit or 64 bit
[root@localhost ~]# getconf LONG_BIT
64
with help of getconf command we can also find whether the installed Linux is of 32 bit or 64 bit