2 minute read

Finding Linux CPU information is essential for understanding the hardware specifications of your system. There are several methods to retrieve processor information in Linux, and here are some of the best ways:

Using the lscpu command:

The lscpu command provides detailed information about the CPU architecture and its capabilities. Open a terminal and type “lscpu” without quotes, then hit Enter. The output will display various details such as CPU model, number of cores and threads, clock speed, cache sizes, and more.

Example:

  $ lscpu
  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
  Vendor ID:           GenuineIntel
  Model name:          Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  ...

Reading the /proc/cpuinfo file:

The /proc/cpuinfo file contains information about each CPU installed on your Linux system. You can view its contents by executing the following command in the terminal: “cat /proc/cpuinfo”. The output will list detailed information for each processor, including the vendor, model name, speed, cache sizes, and other relevant data.

Example:

$ cat /proc/cpuinfo
processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 158
...

Using the dmidecode Command:

The dmidecode command allows you to retrieve hardware information from the system BIOS. It provides a comprehensive overview of the system, including CPU details. Open a terminal and run “sudo dmidecode -t processor” without quotes. This command will display processor-related information, such as the socket type, maximum speed, number of cores and threads, and more.

Example:

$ sudo dmidecode -t processor
# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.

Handle 0x0004, DMI type 4, 48 bytes
...
Socket Designation: U3E1
...
Max Speed: 2300 MHz
...

Utilizing the Hardinfo Application:

Hardinfo is a graphical application that provides a detailed overview of hardware information in Linux. If it’s not already installed, you can typically find it in your distribution’s package repository. Once installed, launch Hardinfo and navigate to the “Processor” section. Here, you’ll find extensive CPU details, including vendor, model, architecture, cache sizes, and more.

Example: Launch the Hardinfo application and navigate to “Processor” under “Devices” or “System Summary.” Here, you will find detailed CPU information similar to the following:

Processor
-----------
Vendor: GenuineIntel
Model: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Architecture: x86_64
...

These methods should help you obtain comprehensive CPU information on your Linux system. Whether you prefer command-line tools or graphical applications, you have multiple options to choose from based on your preferences and requirements.