1FINDMNT(8)                   System Administration                  FINDMNT(8)
2
3
4

NAME

6       findmnt - find a filesystem
7

SYNOPSIS

9       findmnt [options]
10
11       findmnt [options] device|mountpoint
12
13       findmnt [options] [--source] device [--target path|--mountpoint
14       mountpoint]
15

DESCRIPTION

17       findmnt will list all mounted filesystems or search for a filesystem.
18       The findmnt command is able to search in /etc/fstab, /etc/mtab or
19       /proc/self/mountinfo. If device or mountpoint is not given, all
20       filesystems are shown.
21
22       The device may be specified by device name, major:minor numbers,
23       filesystem label or UUID, or partition label or UUID. Note that findmnt
24       follows mount(8) behavior where a device name may be interpreted as a
25       mountpoint (and vice versa) if the --target, --mountpoint or --source
26       options are not specified.
27
28       The command-line option --target accepts any file or directory and then
29       findmnt displays the filesystem for the given path.
30
31       The command prints all mounted filesystems in the tree-like format by
32       default.
33

OPTIONS

35       -A, --all
36           Disable all built-in filters and print all filesystems.
37
38       -a, --ascii
39           Use ascii characters for tree formatting.
40
41       -b, --bytes
42           Print the SIZE, USED and AVAIL columns in bytes rather than in a
43           human-readable format.
44
45       -C, --nocanonicalize
46           Do not canonicalize paths at all. This option affects the comparing
47           of paths and the evaluation of tags (LABEL, UUID, etc.).
48
49       -c, --canonicalize
50           Canonicalize all printed paths.
51
52       -D, --df
53           Imitate the output of df(1). This option is equivalent to -o
54           SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all pseudo
55           filesystems. Use --all to print all filesystems.
56
57       -d, --direction word
58           The search direction, either forward or backward.
59
60       -e, --evaluate
61           Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the
62           corresponding device names.
63
64       -F, --tab-file path
65           Search in an alternative file. If used with --fstab, --mtab or
66           --kernel, then it overrides the default paths. If specified more
67           than once, then tree-like output is disabled (see the --list
68           option).
69
70       -f, --first-only
71           Print the first matching filesystem only.
72
73       -h, --help
74           Display help text and exit.
75
76       -i, --invert
77           Invert the sense of matching.
78
79       -J, --json
80           Use JSON output format.
81
82       -k, --kernel
83           Search in /proc/self/mountinfo. The output is in the tree-like
84           format. This is the default. The output contains only mount options
85           maintained by kernel (see also --mtab).
86
87       -l, --list
88           Use the list output format. This output format is automatically
89           enabled if the output is restricted by the -t, -O, -S or -T option
90           and the option --submounts is not used or if more that one source
91           file (the option -F) is specified.
92
93       -M, --mountpoint path
94           Explicitly define the mountpoint file or directory. See also
95           --target.
96
97       -m, --mtab
98           Search in /etc/mtab. The output is in the list format by default
99           (see --tree). The output may include user space mount options.
100
101       -N, --task tid
102           Use alternative namespace /proc/<tid>/mountinfo rather than the
103           default /proc/self/mountinfo. If the option is specified more than
104           once, then tree-like output is disabled (see the --list option).
105           See also the unshare(1) command.
106
107       -n, --noheadings
108           Do not print a header line.
109
110       -O, --options list
111           Limit the set of printed filesystems. More than one option may be
112           specified in a comma-separated list. The -t and -O options are
113           cumulative in effect. It is different from -t in that each option
114           is matched exactly; a leading no at the beginning does not have
115           global meaning. The "no" can used for individual items in the list.
116           The "no" prefix interpretation can be disabled by "+" prefix.
117
118       -o, --output list
119           Define output columns. See the --help output to get a list of the
120           currently supported columns. The TARGET column contains tree
121           formatting if the --list or --raw options are not specified.
122
123           The default list of columns may be extended if list is specified in
124           the format +list (e.g., findmnt -o +PROPAGATION).
125
126       --output-all
127           Output almost all available columns. The columns that require
128           --poll are not included.
129
130       -P, --pairs
131           Produce output in the form of key="value" pairs. All potentially
132           unsafe value characters are hex-escaped (\x<code>). The key
133           (variable name) will be modified to contain only characters allowed
134           for a shell variable identifiers, for example, FS_OPTIONS and
135           USE_PCT instead of FS-OPTIONS and USE%.
136
137       -p, --poll[=list]
138           Monitor changes in the /proc/self/mountinfo file. Supported actions
139           are: mount, umount, remount and move. More than one action may be
140           specified in a comma-separated list. All actions are monitored by
141           default.
142
143           The time for which --poll will block can be restricted with the
144           --timeout or --first-only options.
145
146           The standard columns always use the new version of the information
147           from the mountinfo file, except the umount action which is based on
148           the original information cached by findmnt. The poll mode allows
149           using extra columns:
150
151           ACTION
152               mount, umount, move or remount action name; this column is
153               enabled by default
154
155           OLD-TARGET
156               available for umount and move actions
157
158           OLD-OPTIONS
159               available for umount and remount actions
160
161       --pseudo
162           Print only pseudo filesystems.
163
164       --shadow
165           Print only filesystems over-mounted by another filesystem.
166
167       -R, --submounts
168           Print recursively all submounts for the selected filesystems. The
169           restrictions defined by options -t, -O, -S, -T and --direction are
170           not applied to submounts. All submounts are always printed in
171           tree-like order. The option enables the tree-like output format by
172           default. This option has no effect for --mtab or --fstab.
173
174       -r, --raw
175           Use raw output format. All potentially unsafe characters are
176           hex-escaped (\x<code>).
177
178       --real
179           Print only real filesystems.
180
181       -S, --source spec
182           Explicitly define the mount source. Supported specifications are
183           device, maj:min, LABEL=label, UUID=uuid, PARTLABEL=label and
184           PARTUUID=uuid.
185
186       -s, --fstab
187           Search in /etc/fstab. The output is in the list format (see
188           --list).
189
190       -T, --target path
191           Define the mount target. If path is not a mountpoint file or
192           directory, then findmnt checks the path elements in reverse order
193           to get the mountpoint (this feature is supported only when
194           searching in kernel files and unsupported for --fstab). It’s
195           recommended to use the option --mountpoint when checks of path
196           elements are unwanted and path is a strictly specified mountpoint.
197
198       -t, --types list
199           Limit the set of printed filesystems. More than one type may be
200           specified in a comma-separated list. The list of filesystem types
201           can be prefixed with no to specify the filesystem types on which no
202           action should be taken. For more details see mount(8).
203
204       --tree
205           Enable tree-like output if possible. The options is silently
206           ignored for tables where is missing child-parent relation (e.g.,
207           fstab).
208
209       --shadowed
210           Print only filesystems over-mounted by another filesystem.
211
212       -U, --uniq
213           Ignore filesystems with duplicate mount targets, thus effectively
214           skipping over-mounted mount points.
215
216       -u, --notruncate
217           Do not truncate text in columns. The default is to not truncate the
218           TARGET, SOURCE, UUID, LABEL, PARTUUID, PARTLABEL columns. This
219           option disables text truncation also in all other columns.
220
221       -v, --nofsroot
222           Do not print a [/dir] in the SOURCE column for bind mounts or btrfs
223           subvolumes.
224
225       -w, --timeout milliseconds
226           Specify an upper limit on the time for which --poll will block, in
227           milliseconds.
228
229       -x, --verify
230           Check mount table content. The default is to verify /etc/fstab
231           parsability and usability. It’s possible to use this option also
232           with --tab-file. It’s possible to specify source (device) or target
233           (mountpoint) to filter mount table. The option --verbose forces
234           findmnt to print more details.
235
236       --verbose
237           Force findmnt to print more information (--verify only for now).
238
239       --vfs-all
240           When used with VFS-OPTIONS column, print all VFS (fs-independent)
241           flags. This option is designed for auditing purposes to list also
242           default VFS kernel mount options which are normally not listed.
243

ENVIRONMENT

245       LIBMOUNT_FSTAB=<path>
246           overrides the default location of the fstab file
247
248       LIBMOUNT_MTAB=<path>
249           overrides the default location of the mtab file
250
251       LIBMOUNT_DEBUG=all
252           enables libmount debug output
253
254       LIBSMARTCOLS_DEBUG=all
255           enables libsmartcols debug output
256
257       LIBSMARTCOLS_DEBUG_PADDING=on
258           use visible padding characters.
259

EXAMPLES

261       findmnt --fstab -t nfs
262           Prints all NFS filesystems defined in /etc/fstab.
263
264       findmnt --fstab /mnt/foo
265           Prints all /etc/fstab filesystems where the mountpoint directory is
266           /mnt/foo. It also prints bind mounts where /mnt/foo is a source.
267
268       findmnt --fstab --target /mnt/foo
269           Prints all /etc/fstab filesystems where the mountpoint directory is
270           /mnt/foo.
271
272       findmnt --fstab --evaluate
273           Prints all /etc/fstab filesystems and converts LABEL= and UUID=
274           tags to the real device names.
275
276       findmnt -n --raw --evaluate --output=target LABEL=/boot
277           Prints only the mountpoint where the filesystem with label "/boot"
278           is mounted.
279
280       findmnt --poll --mountpoint /mnt/foo
281           Monitors mount, unmount, remount and move on /mnt/foo.
282
283       findmnt --poll=umount --first-only --mountpoint /mnt/foo
284           Waits for /mnt/foo unmount.
285
286       findmnt --poll=remount -t ext3 -O ro
287           Monitors remounts to read-only mode on all ext3 filesystems.
288

AUTHORS

290       Karel Zak <kzak@redhat.com>
291

SEE ALSO

293       fstab(5), mount(8)
294

REPORTING BUGS

296       For bug reports, use the issue tracker at
297       https://github.com/karelzak/util-linux/issues.
298

AVAILABILITY

300       The findmnt command is part of the util-linux package which can be
301       downloaded from Linux Kernel Archive
302       <https://www.kernel.org/pub/linux/utils/util-linux/>.
303
304
305
306util-linux 2.37.2                 2021-08-16                        FINDMNT(8)
Impressum