Linux Find If Processor (CPU) is 64 bit / 32 bit [long mode ~ lm]

http‮www//:s‬.lautturi.com
Linux Find If Processor (CPU) is 64 bit / 32 bit [long mode ~ lm]

To find out if a processor (CPU) on a Linux system is 64-bit or 32-bit, you can use the lscpu command. The lscpu command displays detailed information about the CPU, including the architecture and number of bits.

Here's the basic syntax for the lscpu command:

lscpu

To view the architecture and number of bits of the CPU, you can use the -p option to show the CPU model name and -b option to show the architecture and number of bits:

lscpu -p -b

This will display the CPU model name, architecture, and number of bits.

For example, the output of the lscpu -p -b command on a system with a 64-bit CPU might look something like this:

Model name:            Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    2
Core(s) per socket:    4
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 60
Stepping:              3
CPU MHz:               3405.000
BogoMIPS:              6800.00
Hypervisor vendor:     KVM
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              8192K
NUMA node0 CPU(s):     0-7

In this example, the Architecture field shows that the CPU is a 64-bit processor (x86_64). The CPU op-mode(s) field shows that the CPU can operate in both 32-bit and 64-bit modes.

You can also use the uname command to find out if the CPU is 64-bit or 32-bit. The uname command displays information about the Linux kernel and the system hardware, including the machine hardware name.

uname -m

This will display the machine hardware name, which indicates the architecture of the CPU. For example, if the machine hardware name is x86_64, it indicates that the CPU is a 64-bit processor.

Overall, the lscpu and uname commands are useful tools for finding out if a CPU is 64-bit or 32-bit on a Linux system. By using these commands, you can easily determine the architecture and number of bits of the CPU.

Created Time:2017-10-29 22:08:54  Author:lautturi