The Linux operating system provides multiple filesystems, including ext4, xfs, tmpfs, securityfs, and many more. This guide demonstrates various ways to list all mounted file systems in a Linux system.
1. View Linux Mounted Filesystem Using /proc Filesystem
The /proc/mounts file is a file that displays the status of all filesystems that are currently mounted on the system. The file format closely resembles that of the /etc/fstab file. The file reports the status of mounted filesystems as recorded by the Linux kernel.
Thus, to view all the mounted filesystems, view the /proc/mounts file using the cat command as shown.
$ cat /proc/mounts
2. List Linux Mounted Filesystem Using df Command
The df command is mostly used to check disk space utilization on mounted file systems. It lists, among other statistics, total disk space and available disk space on each mounted filesystem.
-a option is included, the df command lists all the mounted filesystems.
$ df -aTh
3. Print Linux Mounted Filesystems Using findmnt Command
The findmnt command is yet another powerful command that displays all mounted filesystems on your Linux system in a tree-like format.
To print all the mounted filesystems, simply run the command without any arguments.
This prints the output in a tree-like format as shown.
You can pass the
-D option which will print the output similar to the df -Th command
$ findmnt -D
-t option followed by the filesystem type to print specific filesystems. For example, to view all the mounted EXT4 filesystems, run the command:
$ findmnt -t ext4
To view all EXT4 filesystems mounted in the /etc/fstab file, run the command:
$ findmnt --fstab -t ext4
4. Show Mounted Linux Filesystem Using mount Command
You can also use the mount command to list all mounted file systems. Without any arguments, it lists all the mounted filesystems.
In this guide, we have explored four ways that you can use to list all mounted file systems in a Linux system. Your views and feedback on this guide are welcome.