How to find CPU information in Linux

How to check your PC’s CPU temperature
(Image credit: Shutterstock)

You'll definitely want to know how to find CPU information in Linux. Your computer's CPU is like its powerhouse. Knowing more about it isn't just for tech experts — it's a basic skill that lets you understand how your computer works. Whether you're someone who manages systems, writes code, or just likes digging into your computer, learning to find CPU information in Linux is a useful skill. Besides, if you own one of the best computers, it doesn't hurt to learn a little more about it.

The term CPU refers to the Central Processing Unit, which is the primary component of a computer responsible for executing instructions of a computer program. In Linux, as in any other operating system, the CPU plays a crucial role in carrying out computations and managing the overall system performance.

This article covers four simple methods to access your CPU information so you can find out more about your processor, including how many cores it has, its speed, its cache size, and more.

How to find CPU information in Linux

There are four different methods to accessing CPU information covered in this how-to guide. These are:

  1. Checking the basic information in Ubuntu settings
  2. Using the lscpu command
  3. Accessing the cpuinfo file
  4. Searching cpuinfo for specific information

1. Ubuntu: Go to Settings > About

(Image: © Future)

You can get some very basic information about your CPU in your Linux distribution (distro). We're using Ubuntu, but other distros will work in a similar way.

In Ubuntu, you can view information about the hardware and operating system by going to Settings and selecting About.

However, it doesn't tell you much, and if you need more information, then you'll need to open the command line interface, which we'll cover in the next steps.

2. Use the lscpu command in the Command Line Interface

(Image: © Future)

You can easily access CPU information from the Command Line interface. Press Crtl-Alt-T to open the Command Line and enter the Linux command lscpu.

When you run this command in a terminal, it provides information about your system's CPUs. Here are some of the details that lscpu typically displays:

  • Architecture of the CPU, such as x86_64 (64-bit) or x86 (32-bit)
  • Number of CPUs in the system
  • Number of CPU cores per physical CPU socket
  • Number of hardware threads per CPU core
  • Number of CPU sockets
  • Vendor ID, or the CPU's manufacturer (e.g., Intel or AMD)
  • CPU family, model, and stepping
  • Clock speed of the CPU in MHz
  • Sizes of the L1, L2, and L3 levels of CPU cache.
  • Flags that indicate various features supported by the CPU, such as virtualization support (e.g., VT-x or AMD-V)

3. Access Linux's cpuinfo file

(Image: © Future)

The information generated by the lscpu command is taken from Linux's cpuinfo file in the proc directory. This is a virtual file that the Linux kernel generates on the fly.

You can access the information directly from the cpuinfo file if you want to get more in-depth information about your CPU. However, although there is more information, it is presented in a less easy-to-read format than lscpu results.

To access cpuinfo, press Ctrl-Alt-T to open the Command Line Interface and enter the command cat /proc/cpuinfo

4. Search the cpuinfo file

(Image: © Future)

If you're looking for something specific, you can search for text in the cpuinfo file using the grep command.

Enter the command cat /proc/cpuinfo | grep <search term> | uniq

(uniq filters out duplications.) 

In the example above, I searched for the cache size by using the command cat /proc/cpuinfo | grep 'cache size' | uniq

I also searched for 'model name' using the same method.

The grep command provides an effective way to extract specific CPU-related information in Linux, without having to wade through rows of text.


So, that's four ways to check the details of your CPU. There are other methods you can use, such as inxi, cpuid, and hwinfo commands. However, all of these will need to be installed on Linux first as they don't come pre-installed, like the methods we covered above.

Knowing your CPU information provides a fundamental understanding of your system's hardware. Once you know how to access it, you can better appreciate the capabilities and features of your CPU.

Next up, expand your Linux knowledge even further with our other guides. Learn how to add users in Linux, how to find a file in Linux, how to rename a file in Linux, and how to remove a directory in Linux.

Emma Street
Contributor

Emma Street is a freelance content writer who contributes technology and finance articles to a range of websites, including Tom's Guide, Top10.com, and BestMoney. She has over 15 years of experience working in technical development within the fintech industry. When not writing about tech, Emma can be found writing romantic fiction, reviewing films, and updating her tea blog.

Read more
Intel Core Ultra 200HX
Intel Core Ultra 9 275HX CPU is the best-performing laptop processor according to new benchmarks — but Apple still beats it in this key area
Remote System manager
I turned an old phone into a system monitor for my computer — and the results blew me away
Chromebook on a table
5 game-changing Chromebook features you need to try
Intel CPU
New benchmark shows CPUs are getting slower for the first time in history — what is going on?
Intel Core Ultra Series 2
Every Intel Core 200 laptop CPU has been leaked ahead of CES 2025
Intel Core Ultra Series 2
Intel offers apologies and fixes for Arrow Lake performance issues: What you need to know
Latest in Operating Systems
Mac Studio on a desk hooked up to a Studio DIsplay
Mac Studio M3 Ultra: 3 reasons to buy and 2 reasons to skip
Microsoft Office is finally as it should have been on iPad
Microsoft tests free Word, PowerPoint and Excel apps for Windows — expect a lot of ads
laptop anger
Latest Windows 11 update reportedly breaking major parts of the operating system
Windows 10 logo
Windows 10 end of life set for this year — everything you need to know to get ready
Windows 11 logo on a laptop screen
I reviewed Windows 11, and these are the 5 new features I'm most excited about for 2025
A Windows 11 laptop, demonstrating how to run Android apps on Windows 11
How to remove the Windows 11 news and weather widget
Latest in How To
Manus AI logo on smartphone screen
How to join Manus — the new AI assistant everyone is talking about
iPhone 16 Pro shown held in hand
You can disable those awkward AI message summaries on iPhone — here's how
Scottie Scheffler of the United States plays a shot from a bunker prior to The Players Championship at TPC Sawgrass
The Players Championship 2025 live stream: how to watch the PGA Tour golf online
White bottle of bleach with cleaning products in blue box
How to get rid of bleach smell in your home — 5 quick tips to do now
iPhone 16 Pro Max shown in hand
iOS 18.4 has dropped — 5 new iPhone features to try first
What size air purifier do you need? We ask the experts