Skip to Content

3 ways to list mount points in Linux

In Linux, there are three ways to list mount points: using the df command, using the mount command, and using the cat /proc/mounts command. In this blog post, we will discuss each of these commands in detail. We will also provide examples of how to use each command. By the end of this blog post, you will be able to list all of the mount points on your Linux system!

what is mount point in Linux

In Linux, a mount point is a directory where a filesystem is mounted. This means that the contents of the filesystem are stored in the mount point directory, and the filesystem can be accessed from there. For example, if you have a filesystem on your hard drive that you want to access from Linux, you would need to mount it on a mount point.

List mount points with df command in Linux

To list the mount points in Linux, we can use df command. This command can be used to display information about mounted filesystems. By default, df command will list all the mount points on your system. You can also specify the mount point of the filesystem that you want to check.

For example, if you wanted to check the amount of free space on the filesystem that is mounted at /, you would use the following command: df /

This command would output the following information:
Filesystem Size Used Avail Use% Mounted on
/dev/sda 100G 12G 88G 12% /

The df command can be also used to display information about how much disk space is free on a filesystem.

List mount points with mount command in Linux

The mount command is used to list all of the mounted filesystems on a system. To use the mount command, you need to specify the -l option. For example, if you wanted to list all of the mounted filesystems on your system, you would use the following command: mount -l

This command would output the following information:

/dev/sda on / type ext (rw,noatime)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /dev type devtmpfs (rw,noexec,nosuid)

List mount points with cat /proc/mounts command in Linux

The cat /proc/mounts command is used to list all of the mounted filesystems on a system. To use this command, you do not need to specify any options. For example, if you wanted to list all of the mounted filesystems on your system, you would use the following command: cat /proc/mounts

This command would output the following information:
/dev/sda / ext (rw,noatime)
proc /proc proc (rw,noexec,nosuid,nodev)
sysfs /sys sysfs (rw,noexec,nosuid,nodev)

You can combine this command with grep command together to get the info of the specific mount point info.

As you can see, all three of these commands provide different information about mounted filesystems. However, all three commands can be used to list all of the mount points on a Linux system.

Example:To list all the mount points on your system, you would use any of the following commands: df /, mount -l, or cat /proc/mounts.

By the end of this blog post, you will be able to list all of the mount points on your Linux system! Try using one of the commands discussed in this post today and see what mount points are available on your system.

linux2023

Monday 23rd of January 2023

fantastic submit, very informative. I ponder why the opposite experts of this sector don't realize this. You should proceed your writing. I am confident, you have a huge readers' base already!