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:

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.

A Little About The ‘lspci’ Command

Today’s article is going to be another article where we get back to the basics, where we’ll learn a little about the ‘lspci’ command. As far as articles go, this one should be both fairly brief and easy to understand. To learn more about the ‘lspci’ command, read on! 

I am going to be writing some articles that cover the basics. I decided to not write them all at once, but to intersperse them with other articles. So far, we’ve had:

A Little About The ‘lsusb’ Command
A Little About The ‘lscpu’ Command

Well, this time around we’re going to cover ‘lspci’. 

So, what is ‘lspci’? We can find no better source than the man pages, which helpfully describe ‘lspci’ as:

lspci – list all PCI devices

Well, we see that it lists PCI devices, but what are those? PCI is another way hardware components talk with the CPU. If you have a fancy graphics card, it’s probably PCI-based (but likely PCI-X). If you’re really curious, PCI stands for “Peripheral Component Interconnect” but think of it as a way hardware can talk to the central processing unit.

So, the ‘lspci’ command will list things attached to the computer on the PCI bus. This is remarkably similar to the ‘lsusb’ command, though PCI can have a USB device attached to it through a hub.

Anyhow, that’s what PCI is and that’s what ‘lspci’ is meant to do. So, with that in mind, let’s just belly-flop into the article!

The ‘lspci’ Command:

You’ll find that ‘lspci’ is a terminal-based command. As such, you’ll have to have a terminal window open. If you don’t know how to open your default terminal emulator, just press CTRL + ALT + T and your default terminal should open.

We will not be covering everything that can be done with the ‘lspci’ command. We might have time and space (this time around), there’s really no reason to dive deeper into the ‘lspci’ command. We’re just going to cover the basics – because that’s all you’ll realistically have to worry about.

With your terminal now open, just run the command with no flags (but with sudo, ’cause ‘lspci’ wants elevated permissions to operate):

If you want a more verbose output, you can do that. Your choices are -v, -vv, and -vvv with ever-increasing amounts of verbosity. That can be pretty handy. Try this command to experience the most verbose output:

Where you might find the ‘lspci’ command most useful would be when you already know the class and category of information you want returned. When you use ‘lspci’ with ‘grep’, it gets more useful. For example, to learn about your memory:

See? It’s pretty straightforward. You’ll get this. I’m sure of it! (See 2nd edit below.)

As you can see, there’s quite a bit that you can do with the ‘lspci’ command. It’s a pretty handy command and we’ve just covered the ways you’re most likely to use ‘lspci’. 

EDIT: Fixed some information. I had somehow started to include lshw commands.
EDIT: So, this article was horribly written. Now it’s just short. I conflated ‘lspci’ with ‘lshw’ somehow – probably ’cause they’re next to each other in my notes. I’m just going to leave it as it is now.

Closure:

There it is, another new article! This time, we’re learning a little about the ‘lspci’ command. It’s a handy command to have learned, as you’ll eventually want to know about the hardware using the PCI bus. When that day does come, you’ll be able to use the command. Also, I’m ahead of schedule with pre-written articles.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

A Little About The ‘lsusb’ Command.

Today’s article will not be all that long or all that complicated, as we’ll just be learning a little about the ‘lsusb’ command. It seems like a good idea to cover it now, early in the year. I’ve been meaning to get to writing this article for a while.

Over the next few days, you will probably see some similar-looking articles. This is just the start. There are other similar commands and we’re going to cover those. Many of my readers will know some (or all) about these commands, and that’s okay. After all, our goal is getting people up to speed.

Today’s command will be the ‘lsusb’ command. If you check the man page, it’s described accurately – like so:

lsusb – list USB devices

As you can see, you use the ‘lsusb’ command when you want to learn about your system’s USB buses and the devices connected to them. You shouldn’t need to install anything. The ‘lsusb’ application is almost certainly available by default.

We probably won’t be covering all the ‘lsusb’ options. We’re just going to cover those options that you’re most likely to use. There’s always the man page for when you want more options. There’s really no need to get to deep in an article like this.

About The ‘lsusb’ Command:

The ‘lsusb’ command is a command that’s run only in the terminal. So, of course, you’ll need to have an open terminal available. If you just press CTRL + ALT + T and your default terminal should open. Tada! It’s pure witchcraft!

With your terminal now open, the simplest form of ‘lsusb’ is to just run the command without any flags. Like so:

You’ll likely get an output similar to this:

output from the 'lsusb' command
This is just the ‘lsusb’ output from a handy laptop. It’s pretty basic, with nothing connected.

As you can see, it’s not always just the actual USB ports on the side of your device that are USB devices. In the above screenshot, you can see that the wireless card, webcam, and Bluetooth devices are all on the USB bus. They’re not actually connected to a physical USB port, they’re just using the same underlying tech without actually having physical ports.

There are other things you can do with ‘lsusb’, like view the output in tree format. This is great if you’ve got things like USB hubs with things attached to them. It’s good organization and the command is simply:

The only other ‘lsusb’ command you’re likely to use is the ‘verbose’ mode. Like oh so many other applications, that’s the -v flag. The command looks like:

This is not to be confused with lsusb -V – which will show you the version. If you do that, you’ll also learn that the ‘lsusb’ command is a part of the ‘usbutils’ package. 

There’s not all that much more to the ‘lsusb’ command. Those are the ‘lsusb’ commands I’ve found myself using more than any others. They’re also the most used commands I’d ask a user to run when diagnosing a problem with their USB devices. If you want, you can learn more by checking the man page:

There’s more information in the man page about running the ‘lsusb’ command. Feel free to check it out and ask any questions needed.

Closure:

I’m going to cover some pretty basic stuff in the next few articles. I may intersperse them with other articles, so that folks don’t get bored. Don’t be bashful, leave a comment or two if you want. I love getting new comments and the site’s starting to grow quite nicely. Get your comments in early!

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Let’s Install INXI

INXI is something I mention a lot. In fact, I’ve done a whole INXI article before, I like it that much. It makes sharing detailed hardware information easy. The people trying to help you when you need support may need detailed information about your hardware, which is where INXI excels and why it exists.

You may notice that I didn’t actually link to said previous article. It was a very different article. This one is really just about installing INXI, so that you can toss it out as a quick link while asking for more information. I’ll rewrite the old article to suit this site, probably when I want an ‘easy’ article. Anyhow…

When you post on forums, such as Linux.org, your question may require sharing information about your hardware. Unless otherwise specified, the way I’d run INXI is this:

Or:

The output of either of those will give you an adequate amount of information and covers most all the bases. It’s most of the available information without being all of the available information. You may be asked to run a more specific command and you should post the data between the [code]<output from command>[/code] tags to make it more easily read.

So, why this article? Well, there might as well be an article that tells you how to install it. This? This is that article. You’re welcome!

Installing INXI:

Let’s get right to it and start with the easy way. Start by opening  your terminal by pressing CTRL + ALT + T. Once that’s open, use the following command as is appropriate for your distro’s package manager.

Debian/Ubuntu: 

RHEL/Fedora:

Manjaro:

OpenSUSE:

Any of those should work with the right distro. INXI is a commonly used application and a great tool for your toolbox. So, depending on your distro, use one of those commands.

If you need to install it manually, and you’ll likely need elevated permissions for this, you can just run:

Because that doesn’t include the man page, you can grab that and install it with a simple command:

If nothing else, those last two commands should work on every Linux desktop system out there, though I suppose you may need to first install wget and need permission to write to the correct directories.

Now that you have INXI (and the manual) installed, just use the inxi -h command. If you’re asking for support somewhere, they’ll probably tell you which command they want you to run when they ask you to run it.

See also: https://smxi.org/

Closure:

Yup… This is a short article, and intentionally so. The goal here is to write an article that helps people install INXI. I think I’ve done that. I may write an article that’s more detailed, meaning ways of using INXI, but today is not that day. Today, it’s just about installation.

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 own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.

Graphically Examine Hardware Info With HardInfo

Sometimes old tools are the best, or at least adequate. In this case, we’re talking about HardInfo – a tool that hasn’t been updated in about 7 years, but still does a great job.

This is Linux. There are a ton of great applications to detect and list your hardware. Most of them are CLI. HardInfo is one application that lets you graphically detect and show your computer’s hardware. It’s rather out of date, but that doesn’t seem to hinder it any.

Welcome to HardInfo!

HardInfo used to be installed by default with Lubuntu. As near as I can tell, the last time it was included by default was in Bionic (18.04) and it has now been left aside as an old relic and with nothing replacing it.

You may remember it, but you may remember it with a different name. In your menu, it showed up as “System Profiler and Benchmark” and may well have been overlooked by many. Not me, I use it every time I get a new computer and want to check out the performance.

Allow me to explain…

See, it doesn’t just list the hardware that it finds, it also (as the menu entry implies) lets you run a bunch of pretty neat benchmarks. If your computer is fairly modern, then it will likely exceed all the default benchmarks listed in the program. It has been a long time since it has been updated, after all. Still, it’s great to see what your computer is capable of.

The great thing about it is that it’s simple and self-explanatory. I don’t really have to tell you how to use it. You can figure it out easily enough on your own. I only need to make you aware of it!

Installing it is easy enough. If you’re using a Debian/Ubuntu distro, or a derivative, you can install it right from your default repositories. This is true for most other distros, I suspect. I confess, I made absolutely no effort to look this up! Still, to install it in Ubuntu, you’d  start by opening your terminal. Use your keyboard to open your default terminal by pressing CTRL + ALT + T.

Then, just run the following command:

Then, just open it from your menu – somewhere under system tools and by the name mentioned above. It should look a little like this:

hardinfo in action
See? This is nice and easy. Anyone can figure it out!

Scroll down and you can run a bunch of different benchmarks! Once again, this is entirely self-explanatory. If you use a more modern device, you’ll shatter the records listed for other computers – which is a nice boost of endorphins – like so!

HardInfo doing a quick benchmark.
See? Even my older computers slaughter the competition!

And, there you have it. HardInfo is still a pretty wonderful tool. I like it for all the benchmarks it offers. They’re a great way to get a rough estimate of performance. It’d be great if that section was updated with more modern devices, but I am not a very good programmer. Maybe one of you will download the source, fork it, update it, and maintain it? It’d be a great asset to the community!

Bonus: CPU-X

If you want something more modern, that gives the same information but has fewer benchmark choices, then you can always take a look at CPU-X. CPU-X is from the folks at X0rg (not to be confused with X.org) and has been updated much more recently. It’s a great GUI way to check your hardware. Once again, you can install it from your default repositories. Once again, that looks like this for Debian/Ubuntu/apt using distros:

It too is fairly self-explanatory. If you need help using it, perhaps Linux is not the best choice for you! Ha! I kid… If you need help using it, just go ahead and ask. I’ll do my best to get you sorted.

If you want a more modern version, you can download it. It’s a little complex, but not very. First stop, visit the CPU-X GitHub page and click on the latest release – on the right.

Once you’re there, you can download the AppImage, which is probably easiest. If you want, you can grab the package for your OS, it’ll be in tar.gz format. Open it with your archive manager.

Inside that archive, you’ll find some .deb files. You know what to do with those. First, extract the CPU-X .deb and then extract the ‘libcpuid’ file – not the one with dev in the title.

Once you have them both extracted, you need to install the appropriate library file before you install the CPU-X .deb. The library is a required dependency and the one in the default repositories is not new enough to work with the newer CPU-X.

You’ll also possibly get a warning that says you have an older version available in the repositories and that you should install that version instead of the newest version. You can skip that warning and install the newer version just fine. It shouldn’t break anything!

When you start CPU-X, it will ask you to run as root. To get all the information, you will need to run it as root. So, go ahead and either select “Run as Root” in the menu or go ahead and choose to run it as root when prompted. It will, of course, ask you for your password. If you’ve done it correctly, it will look a little like this:

cpu-x up and running
See? It works and it too is easy to understand. Sweet!

If you use the right arrow near the top, you’ll see there are benchmarks available. They’re two simple benchmarks where your computer generates prime numbers. You can select the duration and the number of threads. Other than that, it’s not really all that complicated or informative. It’s there if you want to.

Anyhow, there you have it. You have a couple of ways to graphically check your hardware information. If you don’t want to use something like inxi, this is the next best thing. Thanks for reading and be sure to sign up for the newsletter. 

Subscribe To Our Newsletter
Get notified when new articles are published! It's free and I won't send you any spam.
Linux Tips
Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.