Skip to main content

findmnt — List Mount Points

findmnt shows what is mounted where by reading the system mount tables. Use it to confirm whether /mnt/backups is actually mounted (and from which device), to map a path like /var/www/html to its mount point, and to validate mount options before you troubleshoot disk space or performance issues on a WordPress VPS.

Quick Summary

Use findmnt -T /var/www/html to see the filesystem and source device that backs your WordPress path. Use findmnt -S UUID=... to locate where a specific disk is mounted.

Mental Model

Prerequisites

findmnt is provided by the util-linux package and is installed by default on most Linux servers.

Verify it exists:

verify-findmnt-installed.sh
which findmnt
findmnt --version

Core Syntax

findmnt-syntax.sh
findmnt [OPTIONS]
findmnt -T <path>
findmnt -S <source>
  • -T targets a path (directory or file) and finds the mount that contains it.
  • -S targets a source (device name, UUID=..., LABEL=...) and finds where it is mounted.

Key Options

OptionWhat it doesExampleWordPress / VPS use case
-T <path>Find mount for a pathfindmnt -T /var/www/htmlConfirm WordPress is on / or a separate volume
-S <source>Find mount for a sourcefindmnt -S /dev/sdb1Confirm where a disk is mounted
-S UUID=...Match by UUIDfindmnt -S UUID=6666-...Stable lookup independent of /dev/sdX names
-o <cols>Select output columnsfindmnt -o TARGET,SOURCE,FSTYPE,OPTIONSCleaner runbook output
-nNo headingsfindmnt -n -T /var/www/htmlScript-friendly output
-rRaw outputfindmnt -r -T /var/www/htmlAvoid truncation/tree formatting
-D / --dfdf-like outputfindmnt -D -T /var/www/htmlQuick capacity-style view
-JJSON outputfindmnt -J -T /var/www/htmlProgrammatic parsing

Examples (Commands + Expected Output)

Output varies

Mount points and device names are examples. Your VPS may use vda or NVMe devices.

List all mounts (tree view)

findmnt-list-all.sh
findmnt

Expected output:

example-output-findmnt-list-all.txt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda1 ext4 rw,relatime
|-/dev/shm tmpfs tmpfs rw,nosuid,nodev
`-/mnt/backups /dev/sdb1 ext4 rw,relatime

Use case: See the full mount layout.

Find which mount backs the WordPress root

findmnt-wordpress-path.sh
findmnt -T /var/www/html

Expected output:

example-output-findmnt-wordpress.txt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda1 ext4 rw,relatime

Use case: Confirm where WordPress data lives before resizing or cleanup.

Verify a backup mount is present

findmnt-backup-mount.sh
findmnt -T /mnt/backups

Expected output:

example-output-findmnt-backups.txt
TARGET SOURCE FSTYPE OPTIONS
/mnt/backups /dev/sdb1 ext4 rw,relatime

Use case: Catch "backup ran to local disk because the mount wasn't mounted" incidents.

Find where a device is mounted

findmnt-by-source-device.sh
findmnt -S /dev/sdb1

Expected output:

example-output-findmnt-by-source.txt
TARGET SOURCE FSTYPE OPTIONS
/mnt/backups /dev/sdb1 ext4 rw,relatime

Use case: Identify mountpoint for a disk you plan to unmount.

Find by UUID (stable lookup)

findmnt-by-uuid.sh
findmnt -S UUID=66666666-7777-8888-9999-000000000000

Expected output:

example-output-findmnt-by-uuid.txt
TARGET SOURCE FSTYPE OPTIONS
/mnt/backups /dev/sdb1 ext4 rw,relatime

Use case: Troubleshoot fstab mounts using UUIDs.

findmnt-custom-columns.sh
findmnt -T /var/www/html -o TARGET,SOURCE,FSTYPE,OPTIONS

Expected output:

example-output-findmnt-columns.txt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/sda1 ext4 rw,relatime

Use case: Copy/paste a clean mount summary into a ticket.

df-like view for a path

findmnt-df-like.sh
findmnt -D -T /var/www/html

Expected output:

example-output-findmnt-df-like.txt
SOURCE FSTYPE SIZE USED AVAIL USE% TARGET
/dev/sda1 ext4 50G 10G 40G 20% /

Use case: Quick capacity view without switching tools.

WordPress VPS Use Cases

SituationWhat you want to confirmCommandWhy it helps
Disk is filling upWhich mount backs WordPressfindmnt -T /var/www/htmlEnsures you're looking at the right filesystem
Backups look too smallWhether backup mount was presentfindmnt -T /mnt/backupsDetects missing mounts
Mount option tuningCurrent mount optionsfindmnt -T / -o OPTIONSVerifies noatime, discard, etc.

Troubleshooting

ProblemLikely causeFix
findmnt -T /mnt/backups shows nothingNot mountedMount it (see mount) or fix /etc/fstab
Mount exists but source is unexpectedWrong device mountedUnmount and mount the correct device (carefully)
Output is truncatedTerminal widthAdd -r (raw) or select fewer columns with -o

Best Practices

  • Use findmnt -T PATH as the "truth" when you're unsure which filesystem contains a directory.
  • Pair findmnt with lsblk -p -f and blkid when you are building or debugging mounts.
Cheat Sheet
findmnt-cheat-sheet.sh
findmnt
findmnt -T /var/www/html
findmnt -T /mnt/backups
findmnt -S /dev/sdb1
findmnt -S UUID=<uuid>
findmnt -D -T /var/www/html
findmnt -T / -o TARGET,SOURCE,FSTYPE,OPTIONS

What's Next