How to Use the findmnt Command in Linux to Inspect Mount Points and Filesystem Trees

Auditing mounted filesystems on Linux servers historically involved parsing the dense output of mount or inspecting raw text tables inside /proc/mounts and /etc/fstab. On modern container hosts and enterprise storage servers with dozens of virtual overlay mounts, loop devices, and bind mounts, reading raw mount streams is difficult. The findmnt utility, part of the standard util-linux package, provides a fast, tree-structured visual representation of all active filesystems, mount options, and device sources directly in your terminal.

Basic Syntax and Default Tree Visualization

Executing findmnt without any arguments displays all currently mounted filesystems organized in a logical parent-child visual tree:

findmnt

The standard output presents four primary columns:

  • TARGET: The mount point directory path (such as /, /boot/efi, or /var/lib/docker/overlay2).
  • SOURCE: The underlying storage block device (e.g., /dev/nvme0n1p2), virtual pseudodevice (tmpfs, proc), or network share.
  • FSTYPE: The filesystem format (e.g., ext4, xfs, btrfs, overlay, nfs4).
  • OPTIONS: Active kernel mount options (such as rw, ro, relatime, seclabel, or subvol=/@).

Essential findmnt Filtering Techniques for Sysadmins

1. Inspecting a Specific Mount Point or Device

To inspect the mount configuration and options of a single directory or storage block device:

findmnt /var
findmnt /dev/sda1

The command instantly isolates the specific filesystem entry and its parent hierarchy.

2. Filtering by Filesystem Type (-t)

To display only specific filesystem types—such as physical ext4 partitions, network NFS shares, or Docker overlay layers—use the -t switch:

findmnt -t ext4,xfs
findmnt -t nfs,nfs4
findmnt -t overlay

3. Verifying and Auditing /etc/fstab Configurations (–verify)

Misconfigured entries in /etc/fstab can prevent a Linux server from booting or cause emergency maintenance shell drops following a reboot. findmnt includes a dedicated fstab verification engine that checks for syntax errors, missing mount points, and invalid UUIDs:

sudo findmnt --verify

If errors exist, findmnt highlights the exact line number, reporting warnings such as unknown mount option or target directory does not exist.

4. Comparing Active Mounts Against /etc/fstab (–fstab)

To query only what is defined in /etc/fstab rather than live kernel memory, pass the --fstab flag:

findmnt --fstab

To find mounted filesystems that are currently active in kernel memory but missing from /etc/fstab (meaning they will disappear upon system reboot):

findmnt --real

Exporting Mount Telemetry to JSON or Script-Friendly Formats

DevOps engineers and automation scripts can consume findmnt output cleanly using machine-readable output formatting:

  • findmnt -J: Outputs the complete mount hierarchy in structured JSON format.
  • findmnt -l: Formats output as a flat, unindented list instead of a visual tree.
  • findmnt -r: Raw output suitable for shell pipes and awk evaluation.

For example, to extract only mount targets and storage devices in JSON for a monitoring daemon, run:

findmnt -J -o TARGET,SOURCE,FSTYPE,USED,AVAIL

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.