Traditional Linux tools like mount or reading /proc/mounts directly output dense, unformatted walls of text that make it difficult to determine mount hierarchies, nested bind mounts, or inherited flags. Part of the core util-linux package, findmnt provides a modern, structured alternative. It displays active mount points in an intuitive visual tree, searches for filesystems by device UUID or label, verifies kernel mount options, and detects discrepancies between active mounts and static configuration files like /etc/fstab.
Viewing the Active Filesystem Hierarchy as a Tree
Executing findmnt without flags outputs a hierarchical tree representation of all mounted filesystems:
findmnt
The visual tree displays four core attributes:
- TARGET: The filesystem mount point directory (e.g.,
/,/boot/efi, or/var/log). - SOURCE: The backing block device, virtual filesystem, or network export (e.g.,
/dev/nvme0n1p2,tmpfs, oroverlay). - FSTYPE: The filesystem format (e.g.,
ext4,btrfs,xfs,vfat, ornfs4). - OPTIONS: Active runtime mount flags applied by the kernel (e.g.,
rw,relatime,discard).
Filtering by Block Device, Directory, or Mount Point
To inspect the mount status of a specific block device or partition:
findmnt /dev/sda1
To locate which filesystem and partition hosts a specific file or folder path:
findmnt -T /var/log/syslog
The -T (or --target) flag resolves symlinks and parent directory paths, displaying the exact mounted block volume where the file resides.
Auditing and Validating /etc/fstab Configurations
Before rebooting a server after modifying storage mounts, verify that /etc/fstab is syntactically sound and check whether static definitions match live mounts:
findmnt --verify
The --verify mode parses /etc/fstab and checks for missing source devices, invalid UUID strings, non-existent mount target directories, and unsupported filesystem options, alerting you to potential boot failures before they occur.
To display only the filesystems defined statically in /etc/fstab (regardless of whether they are currently mounted):
findmnt --fstab
Filtering by Filesystem Type and Mount Options
System administrators managing complex storage tiers can isolate filesystems based on their driver type using the -t switch:
findmnt -t ext4,btrfs,xfs
To search for filesystems mounted with specific security flags—such as locating all partitions mounted in read-only (ro) mode or identifying partitions missing noexec or nosuid protections:
findmnt -O ro
findmnt -O noexec
Generating Machine-Readable JSON and Scriptable Lists
While the tree view is ideal for human readability in the terminal, automated monitoring scripts and provisioning pipelines require tabular or structured data.
To output a flat list without tree formatting characters:
findmnt -l
To export active mount parameters formatted as structured JSON for ingestion into Python or monitoring daemons:
findmnt -J
You can also define custom column outputs using the -o parameter:
findmnt -o TARGET,SOURCE,FSTYPE,USED,AVAIL,USE%
Monitoring Live Mount and Unmount Events
Similar to dmesg -w, findmnt can monitor the kernel for real-time filesystem changes. To observe storage devices, USB drives, or network shares being attached or detached in real time:
findmnt --poll
The command blocks and streams timestamped mount, umount, and move events as they take place.
Essential findmnt Command Options Reference
| Command Switch | Operational Behavior |
|---|---|
findmnt |
Visualises complete hierarchical filesystem tree. |
findmnt -T [Path] |
Identifies the mount point hosting a given file or directory. |
findmnt --verify |
Audits /etc/fstab for syntax errors, missing devices, or invalid paths. |
findmnt -t [Types] |
Filters output by specific filesystem formats (e.g., ext4, xfs). |
findmnt -O [Option] |
Filters mounts matching specific flags (e.g., ro, rw, noexec). |
findmnt -J |
Exports complete mount tree in computer-readable JSON format. |
findmnt --poll |
Streams real-time mount and unmount kernel events to stdout. |