If you’re a Linux user and need to know your CPU hardware specs, there are many ways to find out. In this guide, we’ll focus on Lscpu, the cpuinfo file, as well as Inxi. This guide will show you how to use all of these tools to find your CPU specs on Linux.
To start, open up a terminal window by pressing Ctrl + Alt + T on the keyboard, or search for “Terminal” in the app menu. Once the terminal window is open, follow along with the instructions below that correspond with the tool you prefer to use.
How to check your CPU – Lscpu
The lscpu program is built-in on 99% of all Linux operating systems. So, you do not need to install it before attempting to use it to find out CPU hardware information.
To find out your CPU hardware specs, you can run the lscpu command as is. When you run this command, you’ll see a detailed list at the top. This list denotes your CPU’s architecture, CPU operation modes that it supports (e.g., 64-bit and 32-bit), how many CPU cores (distinguished as CPUs), cores per socket, model name, and many other things.
If you need to filter out a specific item in the lscpu list, you can combine the command with grep and specify your keyword. For example, if you need to find out your exact CPU model name, you can run the following command.
lscpu | grep 'Model name'
Or, if you need to find out how many cores you have on your CPU, you can run the lscpu command with the “Core(s) per socket” keyword. This keyword will filter out the line in the output that tells you how many cores you have.
lscpu | grep 'Core(s) per socket'
There’s a lot of information to gain out of the lscpu command. You can find and filter out any information just by taking grep and adding in a keyword.
lscpu | grep 'MY KEYWORD'
If you wish to save your CPU information output later to a text file, it’s possible. Here’s how you can do it. Pipe the output to a text file using the command below.
lscpu > ~/my-cpu-info.txt
View this text file at any time by executing the following cat command.
In addition to viewing the text file in the terminal with the cat command, you can also view it by clicking on “my-cpu-info.txt” in your Linux file manager. When you click on it, it will launch it in the default text editor.
How to check your CPU – /proc/cpuinfo
Another way to find CPU information is with the
/proc/cpuinfo file. It houses a ton of useful info, and you can use it to find your CPU brand, your core count, and many other things.
To start, open up a terminal window on the desktop. You can open up a terminal window by pressing Ctrl + Alt + T on the keyboard or searching for “Terminal” in the app menu.
Inside the terminal, run the cat command on the /proc/cpuinfo file to view your CPU information.
When you run the above command, it will show you everything there is to know about your CPU. If you want to view specific things, like the model name, you can run cat with the grep command and your specified keyword.
cat /proc/cpuinfo | grep 'model name'
To save any of this information to a file, you can do the following command.
cat /proc/cpuinfo > ~/my-cpu-info.txt
At any time, you can view this CPU information by typing the command below or by clicking on “my-cpu-info.txt” in your file manager.
How to check your CPU – Inxi
Inxi is a handy tool that, once installed, can give you a ton of helpful information about your computer, from CPU to the kernel, memory info, storage, etc. To use Inxi to check your CPU info, you’ll first need to install it.
To install Inxi, open up a terminal window. You can open up a terminal window by pressing Ctrl + Alt + T on the keyboard or searching for it in the app menu. Once the terminal window is open, follow the instructions below to get Inxi working.
sudo apt install inxi
sudo apt-get install inxi
sudo pacman -S git base-devel git clone https://aur.archlinux.org/trizen.git cd trizen/ makepkg -sri trizen -S inxi
sudo dnf install inxi
sudo zypper install inxi
With Inxi installed, you can use it to find your CPU information by using the inxi -C command below.
If you’d like to save this output of your CPU information to a text file, you can do so by entering the following command.
inxi -C > ~/my-cpu-info.txt
To view this file, enter the following command or click on “my-cpu-info.txt” in the file manager.