≡ Menu

How to find the CPU architecture on Linux?

The question – I am on a shared hosting server. I need to find the CPU name and architecture on my Linux box. Is there a command that can be used to do this?

There are two ways in which you can find your CPU type, architecture, 32/64 bit versions and more information. The first and recommended command is called lscpu. The command lscpu is available on most Linux distributions like Debian, CentOS and Ubuntu. The second way is to use the /proc/cpuinfo file that the operating system maintains.

Using lscpu

The command lscpu can be used to get the CPU information, whether its 32 or 64 bit, which company manufactured the CPU (Intel, AMD), the speed of the CPU in MHz and more.

[root@server ~]# lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                0
Vendor ID:             AuthenticAMD
CPU family:            16
Model:                 9
Stepping:              1
CPU MHz:               1000.074
BogoMIPS:              4000.29
Virtualization:        AMD-V
[root@server ~]#

The above output shows that the CPU on my machine is 32 and 64 bit, it is an AMD processor with 1000 MHz speed (1 GHz).

Using /proc/cpuinfo

The special file /proc/cpuinfo also contains a lot of information about the CPU:

[root@server ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 9
model name      : AMD Opteron(tm) Processor 6128
stepping        : 1
cpu MHz         : 1000.074
cache size      : 512 KB
physical id     : 1
siblings        : 8
core id         : 0
cpu cores       : 8
apicid          : 16
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw
bogomips        : 4000.29
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate [8]
[root@server ~]#

As the above output shows, the file /proc/cpuinfo contains similar information as compared to the output of lscpu.

{ 0 comments… add one }

Leave a Comment