Get Your NVMe SSD Information

If you’re using a modern computer, you might be using an NVMe SSD and you might want to know your NVMe information. The standard and older tools may not be all that helpful, even though NVMe SSDs have been around for a while. This article will help you with that, should you want to get your NVMe SSD information.

Let me see if I can explain this…

You’ll often see “NVMe M.2 SSD”, which is a mouthful.

NVMe stands for Non-Volatile Memory Express which is just a specification.

M.2 is another specification for expansion cards.

The device that is used for NVMe is an SSD – Solid State Drive.

SSD, which has been around for quite a while now, differs from previous generations of storage in that it’s electronic and not magnetic. 

We humans have a long history of trying to record things. We’ve used everything from words to pictures, from dots on paper to grooves on wire, from symbols to magnetic, and more…

For computers, a long time was in the magnetic storage age. From spinning drums holding mere bytes of data to complicated spinning platters that hold terabytes of data… We’ve made good use of the magnetic storage mediums over the years.

Solid-state drives don’t use magnets. Data is stored on memory chips that retain their memory (non-volatile) even if the power is disconnected. An SSD is quite common today.

Less common, but growing in popularity, is the NVMe M.2 SSD. This is a much smaller format than the early SSDs (which even came in the 3.5″ format, and surely some obscure formats that I’m overlooking). This is also on a faster bus lane, meaning the read and write speeds far exceed the storage medium before it – including the aforementioned larger SSDs that connect via IDE or (preferably) SATA.

The current consumer options are pretty great and an NVMe SSD is much faster than a regular SSD. The standard SATA SSD is quite common still, while the NVMe M.2 SSD is the latest and greatest.

With me so far?

Well, an NVMe M.2 SSD is a very different architecture and, as such, there are special tools to use. If you want to find the temperature of your NVMe SSD, the normal tools (like hdparm) may not yet work. Instead, there are other tools that you’d want to use.

In this article, we’ll be talking about a tool known as ‘nvme-cli’…

About nvme-cli:

You almost certainly don’t have nvme-cli installed by default. If you did, you’d be able to check the man page. Doing so would show that nvme-cli is described like this:

nvme – the NVMe storage command line interface utility (nvme-cli)

It should be important to know (and we’ll get to the installation step in just a minute) that you’ll be installing the package with one name but referring to, that is using, the application with another name.

For example, it’s man nvme to access the man page. 

NOTE: You will want to read the man page. There’s a whole lot of options and we’re just going to cover one basic command. We’ll learn stuff like the operating temperature of your NVMe. We won’t be worried about the various other options, of which there are many.

Find Your NVMe Information:

If you want to find your NVMe information in the terminal, you can do that. You’ll first need to install a tool known as nvme-cli. To do this, you’ll want an open terminal. You can usually open a terminal by just pressing CTRL + ALT + T

With your terminal now open, you must first install nvme-cli. You’ll find that packages are available for many distros, as they should be as the format is becoming more and more popular. 

Follow one of the basic installation methods below, specifically the one suitable for your distro’s package management system.

Debian/Ubuntu/etc:

SUSE/OpenSUSE/etc:

Fedora/Asahi/etc:

RHEL/CentOS/etc (those with yum available still):

Arch/Manjaro/etc:

I’m pretty sure there’s an nvme-cli package available for all the major Linux distros. If not, I linked to the project page above and you can check there for a package or to compile nvme-cli from source.

Find Your NVMe’s Absolute Path:

You’re going to need the absolute path to where your drive is mounted. That’s a part of the command, so you’ll need that. Just to mix things up a little bit, we’ll use the ‘df’ command. You should have df installed automatically on any major distro. The man page will helpfully describe the df application like so:

df – report file system disk space usage

We don’t care about all that. We just care about the absolute path. This usually starts with /dev/ and ends with the device ID. In an NVMe’s case, it will usually include nvme in the title, which is quite helpful.

So, let’s get that information…

You’ll get an output similar to this one:

It should be obvious that the absolute path for this would be /dev/nvme0n1p1 and that’s the data we’re going to need.

Now, to find your NVMe information, the syntax would be like so:

Using the output from above, an example of that would be:

This will then give you an output like so:

nvme status in the terminanl
There you go, you now have your NVMe Information. It’s not too difficult to do.

Of course, you can pipe this output to other commands. Let’s say you wanted to know the current temperature of your NVMe SSD. You’d do that with the grep command. An example would be:

If you want to know the number of times you’ve powered the device on, you can do that by piping the output to grep again. For example:

So, you can use the nvme-cli application (the nvme command) for quite a bit. You can do a whole lot more with it, so be sure to check the man page if you’re interested in doing more than checking the temperature or how many times you’ve cycled the power on that device.

As NVMe SSDs get more common, you’ll likely start seeing this package installed by default. From what I can see right now, no major distro is including this by default. If you’re using an NVMe M.2 SSD, you might just want to install it. If nothing else, it’s yet another tool that might come in handy.

Closure:

Today’s article is a bit longer than some but I think it’s worth reading. If I didn’t think it was worth reading, I wouldn’t have written as much! There’s so much that I could have covered but I didn’t. Articles have to have only so many words before people lose interest.

I’d have loved to cover the history of computer memory (or perhaps even more about how we humans have recorded stuff) but that didn’t seem prudent. I figured I’d limit the number of words to 1,200, but I still managed to exceed that – though not by too many. Seriously, it’s a pretty fascinating bit of history. You should use Google (and/or YouTube) to see learn about all the different ways we’ve stored data, and that’s just scratching the surface!

Fascinating stuff, I tell you! Fascinating!

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.

Monitor Disk Usage With GDU

I probably shouldn’t say ‘disk’ but I think we’ll all agree that we know what I mean and today we’ll monitor disk usage with ‘gdu’. It’ll be fun! It won’t even be all that complicated! Read on and learn how to monitor disk usage with gdu. It won’t hurt!

If you’re using your storage, you might want to monitor your disk usage. If you’re running low on disk space,  you might want to find out what’s using your disk space so that you can address that. Suffice it to say, that Linux is less than happy when you run low on disk space. Running out of disk space may even prevent system booting and you’ll have to go about it with a live instance, which nobody likes doing.

Oh, I’m sure I’ve covered this before. There are all sorts of tools you can use to monitor disk usage. Some are faster than others and gdu is not one of them. No, no… It’s not fast. But, it’s an option!

Speaking of options to monitor your disk usage, I’ve covered this before!

Show Disk Usage With ‘ncdu’
How To: Check Disk Usage With ‘df’
A Few Ways To Visualize Disk Usage In Linux
How To: Find Large Files Using ‘ncdu’

You might ask yourself why I’m covering this again. The answer is that I like to give you choices. The goal is to bring you up to speed, making you more efficient with your Linux usage. I want to make Linux more approachable for the novice (while still sharing stuff with the experienced users) and one of the ways to do that is to show you the variety of tools available. That way you can pick and choose among the choices. You can pick which works best for you.

In this case, we’ll be using an application known as GDU.

More On GDU:

The tool we’ll be using is known as ‘gdu‘. I’ll explain how to install gdu in Debian-based distros (like Ubuntu or Linux Mint), but you can find packages to install gdu easily. It’s easy to install, trust me.

I assume ‘gdu’ stands for ‘Go disk usage’, with ‘Go’ referring to the programming language and not for a space on a Monopoly board. It is a supposition because the man page and repository say nothing on the matter.

Once you do have gdu installed, you’ll be able to check the man page. Doing so will show you that gdu is described like so:

I might argue the ‘pretty fast’ bit but I’m too lazy to compare and provide actual data. It took quite a while when I ran the application with instructions to scan my entire system (complete with external drives). I got distracted but this is a timed output:

I don’t think it’s all that speedy – but it’s neat. So, there’s that. Which is nice.

Still, it’s the correct tool for the job. Well, it’s a correct tool for the job. As you can see from the links above, there are many correct tools for the job. This is just one of them.

So then, let’s get this installed and use it…

Monitor Disk Usage With GDU:

You know it’s true. This application is terminal-based so you’ll need an open terminal. As I’m writing this for Debian distributions, you can usually just press CTRL + ALT + T to open up your default terminal.

Your command will differ if you’re not using apt. If you’re using apt, you can install gdu with this command:

When you’ve installed gdu, you can navigate to a directory and run the command like this:

You can also run gdu with a specified directory.

An example output would look like this:

Checking disk space with gdu...
This is gdu in the terminal. You can probably figure it out from here. Yes, I have weird stuff.

You use your arrow keys to navigate. If you have any questions, press the question mark. There’s nothing advanced to it. If you wish to exit gdu, press CTRL + C and gdu will terminate properly.

Closure:

There you have it. You’re now using gdu to monitor disk usage. Well, you’re doing so in Debian-based distros. You’ll have to figure it out for your distro but they have packages and binary files available for others. It’s a pretty handy application, even though it’s not all that speedy.

Granted, as far as speed goes, I didn’t compare it with other applications. It doesn’t seem to be all that quick, but it does do the job as intended. It’s a handy way to visualize disk usage in the terminal and a tool worth testing.

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.

Gather Storage Disk Information With ‘smartctl’

This will be a fairly universal article, useful for various distros, for those who want to gather storage disk information with smartctl. This is not a very taxing article, and more could be written, but we’ll simply be using smartctl to gather basic storage device information.

Habit means I want to type ‘hard disk’. I’ll refrain from doing so. I guess I could call them ‘storage drives’ but I’m just going to call them ‘storage disks’, or ‘disk’ when I am referring to the singular.

This isn’t going to get you information about the health of your storage disks or anything like that. Depending on the disk, it will give you information about things like the physical size, trim status, serial number, RPM (for spinning disks), and things like that.

The tool we’ll be using is smartctl, but that’s installed by installing smartmontools. This is going to be an easy install for many distros and I’ll try to detail that as best as I am able.

smartctl:

The tool we’ll be using is smartctl and it’s a terminal-based application. This tool is useful for a variety of things. We’ll just be gathering basic information about our storage drives. 

If you had smartctl installed already, you could check the man page. Doing so would reveal that the application is described like so:

smartctl – Control and Monitor Utility for SMART Disks

I suppose this could be considered controlling the drives (they’re not all disks anymore) but it’s definitely the tool for the job. Trust me on this! I wouldn’t steer you wrong, at least not intentionally. Oh, I do make mistakes, but they’re mostly harmless.

We’ve previously used this tool. Here’s a couple of articles for you:

How To: Check A Disk For Errors
How To: Use S.M.A.R.T. To Check Disk Health

So, in the weirdness of weirdness, if you want to use smartctl, you have to first install smartmontools. So, let’s cover that…

smartmontools:

First, you’re going to need to install smartmontools. We’ll cover how to do this, but it will be done via the terminal. You can use your GUI installer or you can (more often than not) just press CTRL + ALT + T and your default terminal will open.

With your terminal now open, pick the correct command to match your distro:

Debian/Ubuntu/etc:

OpenSUSE/SUSE/etc:

RHEL/CentOS/etc:

Arch/Manjaro/etc:

If you use a mainstream distro, one of the above commands should install smartmontools and give you access to smartctl. There are other distros out there, but I think I’ve covered those appropriately.

Find Storage Information In Linux:

From here on out, the rest is pretty easy. With smartmontools installed, you can check the man page with this command:

The flag we’re interested in would be the -i flag.

Before we go any further, we must first identify the disks we want to learn more about. For that, we’ll run the following command: 

Here’s an example output:

We’re not interested in partitions. We’re just interested in physical disks. (Now that I’m this far through the article, I should have stuck with ‘drives’ instead of disks.) 

If you pay attention to the output, you’ll see that the information we’re after is stuff like sda, sdb, or sdc. Those are all in the /dev/ directory which means that we can check storage disk information with this syntax:

Or, to provide an example…

This is a pretty good way to gather storage disk information. Here’s an example of the output from the previous command:

See? All sorts of information is available behind a simple terminal command! This is even something you can memorize in just a few minutes.

Closure:

I’m not sure when you’ll want to know this information, but it’s information and it is information that’s easily available to you. You simply need to install an application and run the commands listed above. I’m sure you can figure this out. 

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.

Monitor Your Wi-Fi In Linux

If you use a wireless connection on your computer, or wi-fi for short, you might want to monitor your wi-fi. This is a simple task in the terminal and won’t take too long to learn. So, if you’ve ever wanted to monitor your wi-fi, this is the article for you!

There’s more to your wireless connection than just the throughput. There are things like link quality and signal strength that might interest you. It doesn’t stop there, there are all sorts of other bits of information you can learn if you decide to monitor your wi-fi in Linux.

I’ve written a few similar articles, each using a different technology. If you’re interested in those articles, click one of the following links:

Visualize Your Network Traffic With ‘darkstat’
‘vnStat’ A Tool For Monitoring Your Bandwidth Usage
Monitor Bandwidth In Real Time
Monitor Bandwidth With nload

Those are all about monitoring bandwidth and your network connection speed. They’re all fit for purpose, but this article covers wavemon, which is quite different and more specifically about monitoring your wi-fi connection as a whole. This isn’t very complicated or anything. You’ve got this!

This will be done in the terminal, so you might as well prepare yourself for that. So many of my articles do indeed require an open terminal.

wavemon:

The tool we’ll be using is known as wavemon. Like most of these articles, it’s another tool that’s fit for purpose. We want to monitor the waves, radio waves that is. This is one of the tools for the job. In fact, you’ll find the man page describes wavemon like so:

wavemon – a wireless network monitor

To install wavemon, we’ll need an open terminal. You can frequently just press CTRL + ALT + T to open your default terminal emulator. Give that a go. If it doesn’t work you can find the shortcut in your application menu.

With your terminal now open, we need to install wavemon.

Debian/Ubuntu/etc:

RHEL/CentOS:

Arch/Manjaro/etc:

Fedora:

I think I have all of those correct. If not, please leave a comment down below so that I can fix it. If you’d like to add the code to install wavemon on other distros, please leave a comment below. I’m pretty good at getting back to commentators and tend to be quick at fixing articles.

Anyhow, wavemon is the tool you’ll want to use to monitor your wi-fi!

Monitor Your Wi-Fi In Linux:

Leave your terminal open from the installation phase.

This section of the article will be nice and quick. You don’t need to do anything else besides run the command. You don’t even need elevated permissions (such as sudo) for this.

With your terminal open, just enter the following command:

You’ll get a handy output (it may help to resize your terminal for this one) that’s full of information. An example of that output would be this:

using wavemon to monitor wi-fi in the Linux terminal.
It’s fairly easy to understand the output from the wavemon command.

I can’t get F1 to do anything, but F2shows a histograph.

If you do start wavemon with sudo, you can scan for wireless networks with the F3 button.

You can change some settings with F7 if you want.

The F10 button should quit the program. 

If that doesn’t work, CTRL + C will exit wavemon.

But, you can see how much data you’ve received (during this session) and how much data you’ve sent (during this session). It’s all pretty basic stuff and wavemon is a nice and easy way to monitor your wi-fi in Linux.

Closure:

Well, that’s one way to monitor your wi-fi in Linux. If you use a wireless connection and want more information about that connection, wavemon is an acceptable tool for the job. There are certainly other tools out there and this is just one of them. It’s an easy tool to use and I find it’s familiar enough for anyone to understand with relative ease.

I did say that this would be a fairly easy article. It is indeed a fairly easy article! This is one of those things you can learn in just a few minutes. You never know when this information will come in handy. Then again, you might just be curious and want to know this information. You can customize it a bit but I didn’t need to do so.

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.

Short: Fix Typos With A Caret

Today’s article is labeled ‘short’ for a reason, and that reason is that we’re just going to cover how you fix typos with a caret. If you’ve ever made typos in a terminal command, you might be interested in fixing typos with a caret. 

This is labeled ‘Short’ for a reason. I’m trying something new. It will be an intentionally brief article. If there’s any benefit to this, I’ll do more short articles in the future.

If you don’t know, the ^ character is a caret.

If you don’t know, you can fix typos with a caret. It’s not difficult and every single one of us has made typographical errors in a terminal command. That means each and every one of us can benefit from fixing typos with the caret character.

You might also be interested in:

Fix Terminal Command Mistakes

It’s really simple to fix typos with a caret. You’ll see…

Fix Typos With A caret:

This article requires an open terminal. Just press CTRL + ALT + T to open your default terminal emulator.

The syntax is as follows:

That doesn’t make much sense, I’m sure. Let me show you an example. We’ll use the ‘uptime’ command.

Let’s say you made a typo and instead of ‘uptime’ you entered:

This will, of course, throw an error. 

You can use the caret character to fix this. For example:

The output from those commands would look like this:

As you can see, you’re replacing uplime with uptime and using the caret character to do so. This is pretty simple and a great way to save typing time when you make a typo in the terminal – especially if it’s a long command.

It doesn’t need to be the first word or anything like that. Let’s make an example out of the following command:

This is, of course, going to throw an error. So, enter the following:

That will re-run the previous command but will substitute the changed text for the matching text in the erroneous command. It doesn’t matter where the typo is in the previous command. It can be anywhere within the command and doesn’t need to be the first word or anything like that.

Closure:

So, this is a short article. Indeed, it’s called a ‘short’ in the title. If it does well, we may see more of them. If it doesn’t do well, you can expect them to disappear without much of a wrinkle in time. They may catch on. I don’t know. I don’t dare speculate, so your opinions really matter in this case.

I do welcome your opinions on the matter. I also don’t mind typing short articles now and then. As far as I can tell, writing an article takes me about the same amount of time, regardless. So, do let me know your thoughts on the matter. Without you, the reader, this site is pretty pointless. Thus, your thoughts on the matter are of interest to me.

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.

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.