Get Hardware Info With ‘dmidecode’

Today’s article will explain how to use dmidecode to get information about your hardware. The command is a little different than most, as it actually checks your system’s BIOS and reports that information.

Yes, you read that correctly. This dmidecode command checks the BIOS and reports that information. There are times when the BIOS reports different hardware than other tools, so it’s a good idea to have some knowledge about your hardware to begin with.

Anyhow, I could sit here and try to explain dmidecode, or I could just use their description – which is better than I could do.

dmidecode is a tool for dumping a computer’s DMI (some say SMBIOS ) table contents in a human-readable format. This table contains a description of the system’s hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

As you can see, it’s a pretty interesting tool. It’s almost certainly installed for you by default. If it isn’t and you’re using a major distribution, check your system’s repos and it’ll be in there. It’s a pretty neat tool and one that you can use regularly, even though there are other tools that tell you about your hardware.

Using dmidecode:

This article requires an open terminal. Open one with your keyboard by pressing CTRL + ALT + T and your default terminal should open.

Many distros have dmidecode installed by default. If not, you’ll need to install it with your systems software installer. It’s bound to be available for any major distro. Now…

There’s a whole lot to this dmidecode thing, so we’re going to rely on the man page quite a bit. You’re encouraged to crack open a second terminal in which to run man dmidecode. That’ll help!

The first way to run dmidecode is with the -s flag, where you’ll use a name. In your first terminal, type the following to get the BIOS vendor’s name:

That’s the first (and pretty handy) way to run this command. Some of these commands will even give you information that helps you not have to open the case. That one helps you find the BIOS vendor’s name without having to reboot and check the BIOS yourself.

There are quite a number of options (names) that follow the -s flag, such as baseboard-serial-number, processor-family, or even chassis-serial-number. There’s a ton of them – so switch to the terminal with the open man page and check the text next to the -s flag for more information.

The other way to run dmidecode is with the -t flag. In this usage, you’ll need to know the corresponding number to the information you want. That’s okay, you don’t need to memorize them, as I explain below. The basic command is:

The number should correspond to the information you want. In the terminal with the open man page, you can scroll down to see your options. You’ll see that #13 is about the BIOS language, so command would look like:

The output would look similar to this:

dmidecode showing bios language
There’s some cruft in the output, but it is indeed the BIOS language.

You can refer to the above-mentioned man page, memorize them, or use a cheat sheet (if you plan on running the command frequently). I assume the project keeps things updated, so checking the man page at their GitHub would be the most correct source.

Either way, you will see that you will need to know both ways of running dmidecode in order to make the most out of dmidecode. You’ll need to be both fluent with the keywords and with the DMI Types, should you want to make the most out of this application – but you don’t have to memorize the entire man page.

Closure:

There you have it, another article is in the books! This time, it’s about dmidecode – a valuable tool to add to your growing arsenal of tools. It’ll save some time if you end up needing it, so you might as well learn about it before you need it.

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.

How To: Find Your Uptime In Linux

This article will do a bit more than help you find your uptime. There are a number of other thing that’ll be covered, but they all have to do with your uptime.

So, what is uptime? Uptime is how long your system has been up and available. It’s a useful metric, especially if your system is public facing or providing some sort of service that people depend on. In fact, Wikipedia has a definition!

For example, it’s a metric that matters a great deal in web hosting

That link is a link to my small hosting offering, but scroll down to the bottom at said link and you’ll see a link to check the uptime. In fact, I’ll save you a click and you can just click here.

That link is one way of examining system uptime and availability over the internet over a period of time that’s expressed in a pretty manner. You too can find the uptime of at least the system that you’re using, but we won’t be covering pretty graphs or network availability.

In this article, you’ll find your uptime by using the terminal. We’ll cover a few different ways as well as examine the uptime command.

By the way, you can just type man uptime and see how to use the command. It’s not exactly complicated. Anyhow, uptime defines itself as:

uptime – Tell how long the system has been running.

And that’s a pretty accurate statement. So, let’s examine that first!

Find Your Uptime:

For this exercise, you’ll need an open terminal. To open the terminal, just press CTRL + ALT + T and your default terminal should open.

Once the terminal is open, let’s start with the basics:

That’ll give you a basic output, along with your load averages. If you want a more easily readable output, you can just use the -p flag.

If you want to know when it’s counting from, when your system became available, you can do that. To do so, it’s just the -s flag.

That’s pretty much everything that the uptime command can do. That’s not the only way to find your uptime, however. For example, you can open top or htop and see your uptime. If you use htop, it looks like this:

htop showing the uptime
See? It’s right there! It’s in ‘top’ as well. Now you know!

You can also use just a ‘w’ easily enough. It too will find uptime it looks like this:

You can also use ‘screenfetch‘ or ‘neofetch‘ to get your uptime. If you have one or both installed, the commands would look like one of the below:

Both of those will find your uptime and display them.

As you can see, there are many ways to find your uptime. In fact, I’m sure I missed some ways that you might use. If you use a different method, or know of another method, please feel free to leave a comment below!

Closure:

Well, this is it. It’s another article. I must be approaching the halfway point. The goal is to keep this project going for a year and to reassess at that time. If it’s something that’s popular, beneficial, and I’m not burnt out, I’ll keep going with it. Maybe by then someone else will want to take over or help write some stuff? Who knows? We’ll find out at the end of the year!

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.

How To: Display System Information With screenFetch

I have previously written an article about screenFetch vs. Neofetch, and it’s one of my most popular articles, but this one will tell you how to display system information with screenFetch. Why screenFetch? Why not? It’s perfectly usable and this gives me the chance to be more thorough than the previous article.

I suspect I’ll do a similar article about Neofetch, but today is not that day. No, today is about screenFetch (which is horribly stylized with just a capital in the middle) and it’s a fine tool to display system information. In fact, it describes itself as:

screenFetch – The Bash Screenshot Information Tool

screenFetch is one of the tools that displays system information in the terminal. It does so with the goal of being displayed in a screenshot so that you can brag to your friends. It really doesn’t have a whole lot of value beyond that, but that’s fine. It’s informative and handy, and suitable for purpose.

So, without further ado, let’s get into this!

Install screenFetch:

Fortunately, screenFetch can be easily installed and it’s widely available. You can install it from your default repositories easily enough. There’s some odds that it’s already installed by default and, if not, we should be able to get you squared away. 

This article requires an open terminal, like many other articles on this site. If you don’t know how to open the terminal, you can do so with your keyboard – just press CTRL + ALT + T and your default terminal should open. With that terminal open, let’s get screenFetch installed with one of the following commands:

Fedora:

OpenSUSE:

Debian:

Manjaro:

If none of those work, you can just try installing it as you’d install any other app from the terminal. Chances are really good that it’s in your default repos, so  you can graphically find it through your software manager. In fact, it is often installed along with the OS. Now that it’s installed, let’s move on.

Display System Information With screenFetch:

It’s pretty easy to get the basic output. You really only need to enter:

As I mentioned above, screenFetch is meant for screenshots. Sou can get screenFetch to automatically take a screenshot and drop it into your ~/ directory. Just use this command:

If you plan on sharing this information on forums and to show off to your friends, screenFetch has another neat feature. You can not only take a screenshot,  you can theoretically upload it automatically. To do so, you’d use this command:

However, that currently appears to not work. It’ll seemingly upload the screenshot, but it doesn’t give you a direct link to the screenshot. That’s not helpful – but I’m pretty sure this used to work. As screenFetch hasn’t been upgraded in a while, it may be that the image hosts have changed their API. Dunno, ‘snot my job to know. I suspect it’ll someday work again, should the devs continue with the project.

Anyhow, that’s how you use it. You can run man screenfetch to get more information, but the general usage explained here is about all you’ll really use. The point of this article was more to share how install screenFetch than how to display system information with screenFetch.

Closure:

And there you have it, another article. The goal of this one is more to tell you how to install screenFetch in various distros. Once you have it installed, it’s pretty easy to use screenFetch to display system information. If nothing else, it’s yet another article in a growing list of 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.

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.