Hardware

How To: Find Your CPU Information

Today’s article shouldn’t be all that long, as it’s a subject touched on before, as we discuss how to find your CPU information. This will be in the terminal, of course. There are also many ways to find your CPU information. This article will just cover another way that I don’t think we’ve already covered.

I’ve touched on this subject before:

One Way To See CPU Information

In that article, we simply used the ‘cat’ command to read information from a text file. It’s a pretty handy way to find CPU information, but it is not the only way.

You can also get some basic information about your CPU with Screenfetch or Neofetch. I’ve written about those as well:

Screenfetch vs. Neofetch, You Decide!

I’ve even covered ‘lscpu’ in the past. You can read that article here:

A Little About The ‘lscpu’ Command

So, as you can see, there are lots of ways to find out what CPU you’re working with. You can do it graphically, that is in a GUI, if you’d rather. It’s as simple as installing an application called ‘HardInfo’ and you can read more about it here:

Graphically Examine Hardware Info With HardInfo

See? There are all sorts of ways to get information about your CPU. You have all sorts of choices and this article is going to simply detail yet another way to gather this information.

Why? Well, I like to be the kind of person that gives you options. I like that there are so many ways to accomplish a task in Linux.

Why would you want this information? Perhaps you bought a new computer. Then again, you might have paid for a server (virtual or real) and want to confirm that you’re getting what you paid for. You could have multiple devices, such as myself, and not remember what hardware is in each of those devices. 

There are all sorts of reasons why you might want to know your CPU information. There are all sorts of ways to get this information. Today can have a shorter article than we’ve had lately, as we cover this topic yet again.

Find Your CPU Information:

As mentioned in the opening of this article, we’ll be doing this in the terminal. My regular readers will be used to this and will know how to open the terminal. If you don’t know how to open the terminal, you can almost always just press CTRL + ALT + T, and your default terminal will open up. You may otherwise need to open a terminal from your application menu.

With your terminal open, we’ll be using the ‘lshw’ command. You shouldn’t need to install anything. The ‘lshw’ should come pre-installed as it’s a rather basic piece of the common Linux toolbox. If you check the man page (with man lshw), you’ll see that the program is just like many of the other ‘ls* applications, in that it lists hardware. Specifically, it says this:

lshw – list hardware

That’s an accurate enough short description. The actual description says this:

lshw is a small tool to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, mainboard configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines (PowerMac G4 is known to work).

So, the lshw tool is a pretty good tool to have handy when you’re wanting to know information about your hardware. I once botched an article on lshw! I’m sure I’ll botch another one eventually!

Specifically, you simply want to use the command as follows:

sudo lshw -c CPU

You want to run the lshw command with sudo (or as root, if sudo is not available) so that you have the elevated permissions to retrieve full information in the command’s output. If you try to run lshw without elevated permissions, it will remind you that you should do so.

On the man page, you will discover a bug. I’ve yet to see this bug in real life, but there is a bug. The man page explains it like this:

Not all architectures supported by GNU/Linux are fully supported (e.g. CPU detection).

So, that’s something to be aware of. I doubt it’s going to impact (m)any of my readers because we’re almost always using fairly common CPUs. It should correctly identify your CPU.

Closure:

Well, it’s a pretty basic subject and an easy enough command to keep in mind. If you want to find your CPU information, there are a ton of ways to do so and we’ve just covered one more way. This seemed like an easy article to write and I could use an easy day. I think we could all use an easy day once in a while, but the show must go on and you get yet another article for your enjoyment.

I have been making the articles longer. I’m trying to share more information along with the directions. I think it’s good for understanding and it doesn’t take that much more time. If you have an opinion on the matter, please leave a comment.

Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

KGIII

Retired mathematician, residing in the mountains of Maine. I may be old and wise, but I am not infallible. Please point out any errors. And, as always, thanks again for reading.

Recent Posts

Enable/Disable Your Network Interface

Today we'll cover one way to enable or disable your network interface in the Linux…

5 months ago

Check Your NIC Speed In The Terminal

Today's exercise is a nice and simple exercise where we check your NIC speed in…

5 months ago

Easily Monitor Your Wireless Connection

Have you ever wanted to easily monitor your wireless connection? Well, now you can learn…

6 months ago

Count The Files In A Directory

I think I've covered this before with the ls command but this time we'll count…

6 months ago

Get System Information With The ‘uname’ Command In Linux

Today we'll be learning about a basic Linux command that's known as 'uname' and it…

6 months ago

hardinfo Has Been Rebooted As hardinfo2

If you've used hardinfo in the past, it may interest you to know that hardinfo…

6 months ago