Another Way To Show Mounted Filesystems

We’ve covered this topic before, but I want to show you another way that you can show mounted filesystems. As previously covered, you have multiple filesystems mounted at any one time. So, let’s examine them, shall we?

If you use Linux, you use multiple filesystems. There are real and virtual filesystems created and used by the operating system. A real filesystem would be something like a partition on your storage device (one filesystem per partition, of course). A virtual filesystem would be things like your temporary files or cached files, among other filesystems used by the system.

We’ve covered this before and this is just another way to show your mounted filesystems. This is good information to have, as it’s handy to know the path for those things so that you don’t do something silly like misfire a dd command and hosing your OS partition. (Ask me how easy that is.)

Show Your Filesystem In The Linux Terminal
Another Way To View Attached Storage Devices
Another Way To View Attached Storage Devices

(And there are more! This is an oft-covered subject on Linux-Tips!)

So, what will we be using?

findmnt:

You shouldn’t need to install anything for this article. The findmnt tool should be installed by default. You can verify that findmnt is installed by running the following command:

The output of that command should probably match this one:

You check the man page with this command:

There’s additional information available in this application. Run this command:

But, if you check the man page, you’ll see that this is indeed one of the correct tools for the job. This being a basic task, there are many ways to show mounted filesystems. It’s up to you to pick a favorite – or find the most useful of commands for your particular situation.

Anyhow, the man page describes it as:

findmnt – find a filesystem

That’s what we want to do. That means that this is the correct tool for the job.

Show Mounted Filesystems:

You’ve been here long enough to know that we’re likely to use the terminal. If your hunch was that we would be using the terminal, your hunch was correct. You’ll find that findmnt is a terminal-based application so open your default terminal emulator by finding it in your application menu or pressing CTRL + ALT + T on your keyboard.

With your terminal open, you can show mounted filesystems with this command:

You’ll see that it even has a nice tree output. You’ll find things like Snaps have their own filesystem if you’re using a system that uses Snaps. Other jailed applications may also use their own filesystem as a way to keep things separate from the system as a whole. 

Here’s an example truncated output from Lubuntu:

That’s not nearly as complicated as it looks, once you get used to it.

Now, you can trim all that down. You can opt to show only the ‘real’ filesystems. That’s done with the --real flag.

This is an example of that command on that same Lubuntu system used above (Snap applications are seen as ‘real’ filesystems as a part of their separation from the system):

Here’s an example output from a Linux Mint system that does not use Snaps:

You can do more with the findmnt command, such as select the columns you want in your output, so be sure to check the man page. This is just a quick overview because the vast majority of you will never need more than just the basic command.

As I said, it’s a useful command for when you want to verify the path to a filesystem. Beyond that, the usage is up to you. That’s what I use it for when I don’t bother with any one of several other commands.

Closure:

You might see no reason to add this to your list of commands, but it is useful when you want to see all the mounted filesystems on your system. If you need the path for a filesystem, this is a good command. It’s also useful for finding out some attributes of your mounted filesystems.

This is one of those commands you really could keep in your back pocket. You might first lean on a command like lsblk but that only lists block devices – that is, storage devices, and doesn’t include the many other mounted filesystems. If you don’t need this command today, that’s fine. You might need this command in the future, and now you know it exists.

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.

Show Mounted Partitions

Today we’ll have a fairly easy article, one that won’t be too long, as we discuss a couple of ways to show mounted partitions. This isn’t anything complicated. A new user should be able to follow along, so long as they’re not too afraid of the terminal.

Even if a new user was afraid of the terminal, none of these commands perform actions other than providing information. If you are careful, even using copy and paste, you won’t risk harming anything. Then again, this is pretty basic stuff. You can handle it just fine! (I have faith!)

Did you notice how I said “a couple of ways”? Well, I said that because there are all sorts of ways to show mounted partitions. 

If you don’t know what a partition is, it’s pretty easy to understand. You have a storage drive. By itself, it’s pretty useless. You have to decide on a filesystem and add at least one partition for that storage drive to be useful. There are also virtual partitions that are created by, and used by, the operating system.

Additionally, that partition must be mounted to be accessible for normal read and write operations. Sometimes, you may need to unmount a drive to perform certain operations. For example, you can’t change the size of the partitions on a mounted drive.

All we will be doing in this article is showing the mounted partitions. I haven’t just picked two commands, I’ve picked the two commands that I think have the most easily processed output.

Show Mounted Partitions:

The very first paragraph mentioned the terminal. That’s because we’ll be using the terminal for these exercises. So, go ahead and press CTRL + ALT + T. Hopefully, that will open your terminal.

We shouldn’t need to install any new software for the tasks covered in this article. We will be using two different applications, but those are going to be installed by default more often than not. I told you that this one will be easy!

Show Mounted Partitions With The ‘df’ Command:

With your terminal open, you can start by verifying that the df command is installed on your system. You’d do that with this command:

With that information, you’ll not only get the version you’ll see why it’s probably installed by default. The df command is a part of ‘GNU coreutils’, which is a set of GNU-provided applications that should be installed by default.

When you check the man page, you can also that df is described as being:

df – report file system disk space usage

So, that’s probably a pretty good tool for showing your mounted partitions. The df command we’re going to use is quite simple. It looks like this:

You can check the man page to see what those flags are doing:

The command output is nice and easy to understand, but very thorough. The next command we’ll use only shows a subset of the above-mentioned virtual partitions. 

Anyhow, that command may look a bit like this:

using the df command to show mounted partitions
Yes, a lot of that is information you don’t really need to know – but now you do.

As you can see, the output from this df command is very thorough. You almost certainly won’t need that much information. Fortunately, the next command is more concise and will net you about all the information you might need in your day-to-day computing.

Show Mounted Partitions With The ‘findmnt’ Command:

This too is done in the terminal and is another way to do much of what you did in the previous section. You probably don’t have to install anything. The findmnt application is a part of ‘util-linux’ and will also be installed by default.

You can find out if the findmnt command is available with this command:

As you’ll see, is indeed part of the util-linux applications. You might as well check the man page, seeing as we’re already here. To check the findmnt man page, you’d use this command:

While you’re checking the man page, check to see how findmnt describes itself. It’s described like:

findmnt – find a filesystem

If you recall the introduction, I mentioned how you’d need a filesystem to make a partition useful. Findmnt appears to be a pretty good application for those who want to show mounted partitions.

You can run the command and get a cascade of data, much like the df command. Run this command:

But, you can run this command with a -D flag and get a subset of that partition information and this subset of information is probably all you’re going to need regularly. That command looks like this:

The more concise output from that command looks something like this:

showing mounted partitions with the findmnt command
Realistically, this is all the information you’ll likely need when you show mounted partitions.

(It was kind of broken for a while, but I fixed it so that you can click on the images and have them enlarge properly. The bug was a devious bugger, but I think I’ve nailed it.)

The output from that findmnt command is easy to read and doesn’t contain nearly as many of the virtually mounted partitions. It still contains some and I’m not sure why or what the difference is. You can see that both commands spit out slightly different bits of information – but the essential bits are there and, thankfully, they match one another.

See? I told you that it’d be easy!

Closure:

Well, at some point you may want to show mounted partitions. It’s handy information to have when you want to perform some disk operations. It can also be handy to ensure a drive is mounted properly.

There are all sorts of reasons why you might want this information. Then again, there are also a zillion ways to get this information (such as running the sudo fdisk -l command). I’ve just picked a couple of ways, though I had a preference for outputs that are easiest to read. 

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.

How To: List Mounted Partitions

Today we’ll have a nice and simple article, simply because we can, about how to list mounted partitions in Linux. Like so many of these articles, we’re going to need an open terminal. On the other hand, we’ll just be exploring a couple of tools to help us along the way.

Your disk drives, be they solid state or hard disk drives, will be separated into partitions. It can get confusing until you realize that the outputs from these commands won’t always just represent what I’ll call physical partitions. Sometimes, there are virtual partitions – sometimes with their fun file systems.

You may have everything from mounted temporary partitions to software designed to run in its own mounted partition space. When you run these bellow commands, you’ll learn that there are all sorts of mounted partitions. This is completely normal. It’s also pretty easy to weed out the physical partitions.

Why would you want to do this? Well, I’m having a goofy error when I boot one of my computers and I need to narrow it down to which disk it is that’s giving me the error. Once I take the time to do that, I can move on to troubleshooting the problem and finding a solution for the problem.

The tools we’ll be using are ‘findmnt’ and ‘df’. They’re described as the following:

finding:

findmnt – find a filesystem

df:

df – report file system disk space usage

As you can see from the description, both of those have something to do with getting information about a file system. That makes them good tools for the job.

NOTE: There are multiple ways to list mounted partitions. You have GUI and CLI-based tools available to you. One of the goals surrounding this whole project is not just to make people more familiar with Linux but also to help them get comfortable working within the terminal. You’ll be just fine!

List Mounted Partitions:

As I mentioned above, we’ll be using a terminal for this. I do not mind which terminal you’re using but you can usually open the default terminal by pressing CTRL + ALT + T. That works most of the time.

With your terminal now open, you can try the following command:

The output from that command will list your mounted partitions. It’s a lot of text, but most folks are probably only interested in the start of the line. The output of the findmnt command may look a little something like this:

The next command you’re going to want to try will be the ‘df’ command. We’ll be using a few flags. It’s not very complicated, though it may look like it. The command is a simple ‘df’ command and looks like this:

We use the -a flag for ‘all’. Then we use the -T flag because that means type. Finally, we use the -h flag because that means the output will be “human readable” (or more easily read by us mortals.) The output of which looks something like this:

No matter which of those commands you use, it will make your terminal list mounted partitions. If you need to know which partitions are mounted, these are the tools you can start with. They’re easy enough to work with.

Closure:

Well, it’s a bit late in the evening. I almost forgot that there was an article due tomorrow. This happens when I get a lot of responses (elsewhere) on the wrong day. My brain just doesn’t click. I should probably set an automated notification to let me know which days require articles, but I haven’t failed yet. In fact, you get an interesting article about how you can list mounted partitions.

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.