How to find CPU frequency in Linux?

The Central Processing Unit (CPU) is considered an essential component in any system. It is known as the “Computer’s Brain” because it handles all kinds of data processing operations. CPU, an embedded part in any system based on various specifications; frequency is one of them. The CPU frequency is also known as Clock speed or Clock rate. The clock speed of your CPU figures out how quickly it can process instructions per second. It is a unit of measurement for the number of your CPU execution, expressed in MHz or GHz.


Determining the CPU speed and type from the command line is relatively easy in Linux. There are various commands used for obtaining information about your processor, including CPU frequency.


Dmseg command

Dmseg is used for showing messages from the ring buffer of the kernel. In the following example, we have combined the Dmseg command with grep for filtering out the CPU speed from other related information.

$ sudo dmesg | grep MHz


lscpu command

lscpu command helps you to know about your CPU architecture. Lscpu pre-exists in the util-Linux package. Write out the below-given command in your terminal.

$ sudo lscpu


i7z command

i7z is an exclusive tool for retrieving the processor states in Intel-based CPUs such as i3, i5, and i7.

$ sudo i7z


Retrieving CPU speed from “/proc/cpuinfo” file

The “/proc/cpuinfo” file has all content related to the individual CPU cores. Now we will utilize the ‘grep’ and ‘cat’ command to only extract the information about the CPU speed from this file.

$ cat /proc/cpuinfo | grep MHz


Instead of using “grep,” you can also use the “less” command for the same execution purpose.

$ less /proc/cpuinfo


hwinfo command

In the terminal, the detailed information about each hardware device can be printed using “hwinfo.” We will specify the “–cpu” parameter in the “hwinfo” command for displaying only the CPU speed.

$ sudo hwinfo --cpu


inxi script

inxi is a powerful Linux script that permits you to print out the system's hardware details. Execute the inxi command in your terminal with the “-C” option for displaying the processor-related information.

$ sudo inxi -C


