How to determine Intel CPU generation on Linux

Late to the party, I recently heard about the voltage issues that are plaguing 13th and 14th generation Intel processors. While I don’t have many systems with Intel processors, I was still concerned, especially since my home server has started to behave a bit more erratic in the past few months.

Fortunately, it seems that Intel has figured out the issue and will be issuing a patch at some point this month.

While the issue wasn’t applicable to any of my systems, it was still a good exercise to check on the CPU on my systems. Intel’s naming makes it really easy to figure out which generation the processor belongs to, without having to look up anything on their website.

Look up the CPU model name

The first thing we need to do is look up the model name of the CPU. There’s a handful of ways to accomplish this, some of which require commands that may not be available on your system, like lscpu.

Linux systems have a special file in the proc filesystem, that can be read to get the information about the CPU:

% cat /proc/cpuinfo | grep 'model name'
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Zsh

The output may seem bugged, as the processor’s model name is shown multiple times. This is because each core of the processor is listed in the /proc/cpuinfo file.

We can use the head command to reduce the output down to just the first match:

cat /proc/cpuinfo | grep 'model name' | head -n 1
model name	: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Zsh

Determining the CPU generation

As mentioned, Intel makes it pretty easy to figure out, as they include the generation in the thousands place of the CPU number.

For my CPU, the model number, without any alphabetic characters, is 8259. That tells me that my Intel processor is from generation 8, or the 8th generation.

We could definitely throw additional code at the problem, but have already figured out what we want to know, what’s the point?

Josh Sherman - The Man, The Myth, The Avatar

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Head of Engineering and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.


If you found this article helpful, please consider buying me a coffee.