commands

findmnt — inspect mounted filesystems

Read-only util-linux command for discovering the filesystem containing a path. --target accepts a file or directory; it may report an ancestor mount, not the exact path. Select explicit output columns for stable interpretation. This command does not mount, unmount or establish retention policy.

Formal Syntax & Structure

linux syntaxlinux
findmnt [OPTIONS] --target PATH

Parameters & Attributes

NameTypeDescription
--target PATHoptionFind the filesystem containing the given path.
-noptionSuppress column headings.
-o TARGET,FSTYPEoptionSelect the mount target and filesystem type columns.

Return Value

text and exit status

Reports matching filesystem information; exit status zero on success, one on failure or no matching filesystem.

Working Example

Example Snippetlinux
findmnt -n -o TARGET,FSTYPE --target /tmp
Linux Reference