In general, a higher clock speed means a faster CPU. However, many other factors come into play. Your CPU processes many instructions (low-level calculations like arithmetic) from different programs every second. The clock speed measures the number of cycles your CPU executes per second, measured in GHz (gigahertz). A “cycle” is technically a pulse synchronized by an internal oscillator, but for our purposes, they’re a basic unit that helps understand a CPU’s speed. During each cycle, billions of transistors within the processor open and close.
On Linux, there are a number of commands that can be used to obtain the CPU speed of the processor. In this article, we’ll look at some of the most widely used commands for obtaining CPU speed about the CPU.
Method 1: Using hardinfo
Hardinfo is a graphical user interface (GUI) tool that produces reports on various hardware components. It is written in Gtk. However, if there is no GUI display available, it can also be run from the command line.
$ hardinfo | less
Method 2: From /proc/cpuinfo
The /proc/cpuinfo system file lists each CPU Core. System’s individual speed.
$ cat /proc/cpuinfo | grep MHz
Method 3: Using Inxi script
Inxi is a Linux script that allows you to print the system’s hardware details. To print processor-related details, use the inxi command with the ‘-C’ option:
$ sudo inxi -C
Using Inxi script
Method 4: Using hwinfo
In Linux, the hwinfo command prints detailed details about each hardware unit.
$ sudo hwinfo --cpu
Method 5: Using lscpu
Lscpu is a Linux command that displays CPU architecture details. The util-linux package contains this instruction.
$ sudo lscpu
Method 6: Using Dmesg
Dmesg displays messages from the kernel ring buffer and dumps them to /var/log/messages in Linux.
$ sudo dmesg | grep MHz
Method 7: Using i7z
The i7z is a dedicated tool for displaying processor states on Intel i3, i5, and i7 based CPUs.
$ sudo i7z
On Linux-based systems such as Ubuntu, Fedora, Debian, CentOS, and others, those were some commands to check CPU speed.
Share your thoughts in the comments
Please Login to comment...