System and processes

The findmnt command

Shows the mounted file systems as a tree, with the device, type and options of each mount point. It reads the kernel's mount table, so it reflects what is mounted right now, including temporary and container mounts.

Syntax

findmnt [opciones] [punto]Try it in the terminal →

Most useful options

-l, --listFlat list, without the tree: easier to filter with grep
-t, --types <tipo>Only mounts of that type, for example ext4 or nfs
-o, --output <columnas>Chooses columns: TARGET, SOURCE, FSTYPE, OPTIONS, SIZE, USED, AVAIL...
-n, --noheadingsRemoves the header, useful in scripts
-D, --dfShows the space usage of each mount, like df
-J, --jsonJSON output, to process it with jq

Copy-ready examples

$ findmnttree of the system's mounts, with their options.

Example output

TARGET                    SOURCE     FSTYPE OPTIONS
/                         /dev/sda2  ext4   rw,relatime,errors=remount-ro
├─/boot/efi               /dev/sda1  vfat   rw,relatime,fmask=0077,dmask=0077
└─/home                   /dev/sda3  ext4   rw,relatime
$ findmnt -t ext4 -o TARGET,SOURCEonly the ext4 mounts, with two columns.
$ findmnt -Dspace usage per mount, like df but limited to the mounted file systems.
$ findmnt -o TARGET,FSTYPE,SIZE,AVAILpicks space columns to see at a glance which mount is filling up.
$ findmnt -J | jq '.filesystems[].target'lists the mount points as JSON. Useful in scripts that compare mounts.

You can try them in the browser terminal: it does not touch your computer.

Typical mistakes

  • Without arguments, findmnt also shows repeated bind mounts: if you see the same path twice, that is normal.
  • A mount that fails at boot does not appear here; for that, check /etc/fstab and the boot logs.

Differences from similar commands

  • mount: without arguments it lists mounts in the old flat format. findmnt sorts them as a tree and lets you filter.
  • df: shows free space per file system. findmnt -D adds the source and type of each one.
  • lsblk: shows block devices and their partitions, mounted or not. findmnt only shows what is mounted.

Related commands

FAQ

How do I see whether a directory is on another partition?

With findmnt -T path, which shows the mount that holds that path. If the TARGET column is the root, it is on the main partition.

What does noexec in the options mean?

That programs cannot be run from that mount. It is common on /tmp or USB drives, and it explains why a script does not start there.

How do I see how much space each mount has?

With findmnt -D, which shows size, used and available space per mount point.

How do I use it in a script?

With findmnt -n -o TARGET -t ext4, which prints only the paths, without a header.

What is the difference between findmnt and mount?

mount without arguments prints the table in the old format. findmnt shows it as a tree, with selectable columns and JSON output.

Learn to actually use it

The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.

Start the free course