Skip to main content
Tips

List Mounted Drives in Linux

If you want to perform certain operations on a drive, you need to know its details. Learn how to list currently mounted drives in Linux.

Sagar Sharma

Warp Terminal

If you have multiple drives mounted and want to perform any operations such as repartitioning them, it is crucial to have on-point information.

And listing mounted drives can reveal a lot about those mounted drives.

And the easiest way to list mounted drives is to use the findmnt command:

findmnt
use findmnt command in linux

And if you are not a fan of the tree layout of the findmnt, you can follow the other approaches that I'm about to show in this guide.

List mounted drives in Linux using the cat command

The cat command is used to read the contents of the file.

And in this case, I will be using the cat command to read the contents of a /proc/mounts file:

cat /proc/mounts
use cat command to list mounted drives in linux

The advantage of using this method is that the kernel directly provides information about the mounting points.

List mounted drives in Linux using the mount command

The mount command is used to mount the filesystem (pretty generic but that's what the man page said).

And apart from mounting drives, you can also use it for getting information about mounted drives which also includes listing mounted drives.

The command is pretty straightforward. Just append the -l option with the mount command and that's it:

mount -l
use mount command to list mounted drives in linux

Similarly, if you are looking for mounted drives with a specific filesystem, all you need to do is append the filesystem type with the -t option:

mount -l -t filesystem

For example, here I went with the ext4:

mount -l -t ext4
list mounted drives based on their filesystem type in linux

List mounted drives in Linux using the df command

The df command is used to check the free disk space and so for listing mounted drives.

To list mounted drives with the df command, you'd need to use 3 options with it:

sudo df -a -T -h
use df command to list mounted drives in linux

Here,

  • -a will available filesystems.
  • -T will print the filesystem type.
  • -h will get you output in human-readable form.

And if you want to list mounted drives specific to a filesystem type, all you need to do is add the -t option with the previous ones.

So let's say I want to list mounted drives having ext4 filesystem so I will be using the following command:

df -a -T -h -t ext4
use the df command to list mounted drives in Linux

Wrapping Up

In this guide, I went through multiple ways how you can list the mounted drives in Linux. I hope you will find the best match per your needs.

And if you have any queries, let me know in the comments.

Sagar Sharma