Best Ways to Find CPU Information on Linux

1 minute read

If you want to find specific information about your Linux processor or check what CPU you have, there are two methods you can use.

Method 1: Reading /proc/cpuinfo

All the information you need about your processor is accessible through the /proc/cpuinfo file. To obtain processor information, simply open a terminal and enter the following command:

cat /proc/cpuinfo

This command will display human-readable output similar to the following:

processor  : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU           E5310  @ 1.60GHz
stepping        : 7
cpu MHz         : 1600.057
cache size      : 4096 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 5
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu de tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni ssse3 hypervisor
bogomips        : 3207.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:
[...]

In the /proc/cpuinfo file, you will find all the necessary information about your CPU, including its name, number of CPUs, type (model, family), cache sizes, and more.

Method 2: Using the lshw command

The lshw command is a useful tool for obtaining information about your hardware, including the CPU. Open a terminal and enter one of the following commands:

  • For detailed output:

    sudo lshw -class cpu
    
  • For a shorter, summarized output:

    sudo lshw -class cpu -short
    

Running the lshw command will provide information about your CPU, including its description, model, and any logical CPUs associated with it.

By using either of these methods, you can easily retrieve specific information about your processor on a Linux system.

Please note that the output provided in the examples above is for illustration purposes and may vary depending on your specific CPU and system configuration.