1 .TH FINDMNT 8 "May 2018" "util-linux" "System Administration"
3 findmnt \- find a filesystem
10 .IR device | mountpoint
16 .RB [ \-\-target | \-\-mountpoint ]
20 will list all mounted filesystems or search for a filesystem. The
22 command is able to search in
26 .IR /proc/self/mountinfo .
31 is not given, all filesystems are shown.
33 The device may be specified by device name, major:minor numbers,
34 filesystem label or UUID, or partition label or UUID. Note that
38 behavior where a device name may be interpreted
39 as a mountpoint (and vice versa) if the \fB\-\-target\fR, \fB\-\-mountpoint\fR or
40 \fB\-\-source\fR options are not specified.
42 The command prints all mounted filesystems in the tree-like format by default.
46 Disable all built-in filters and print all filesystems.
48 .BR \-a , " \-\-ascii"
49 Use ascii characters for tree formatting.
51 .BR \-b , " \-\-bytes"
52 Print the SIZE, USED and AVAIL columns in bytes rather than in a human-readable format.
54 .BR \-C , " \-\-nocanonicalize"
55 Do not canonicalize paths at all. This option affects the comparing of paths
56 and the evaluation of tags (LABEL, UUID, etc.).
58 .BR \-c , " \-\-canonicalize"
59 Canonicalize all printed paths.
64 This option is equivalent to
65 .B \-o\ SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET
66 but excludes all pseudo filesystems.
67 Use \fB\-\-all\fP to print all filesystems.
69 .BR \-d , " \-\-direction \fIword\fP"
70 The search direction, either
75 .BR \-e , " \-\-evaluate"
76 Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the corresponding device names.
78 .BR \-F , " \-\-tab\-file \fIpath\fP"
79 Search in an alternative file. If used with \fB\-\-fstab\fP, \fB\-\-mtab\fP
80 or \fB\-\-kernel\fP, then it overrides the default paths. If specified more
81 than once, then tree-like output is disabled (see the \fB\-\-list\fP option).
83 .BR \-f , " \-\-first\-only"
84 Print the first matching filesystem only.
87 Display help text and exit.
89 .BR \-i , " \-\-invert"
90 Invert the sense of matching.
93 Use JSON output format.
95 .BR \-k , " \-\-kernel"
97 .IR /proc/self/mountinfo .
98 The output is in the tree-like format. This is the default. The output
99 contains only mount options maintained by kernel (see also \fB\-\-mtab)\fP.
101 .BR \-l , " \-\-list"
102 Use the list output format. This output format is automatically enabled if the
103 output is restricted by the \fB\-t\fP, \fB\-O\fP, \fB\-S\fP or \fB\-T\fP
104 option and the option \fB\-\-submounts\fP is not used or if more that one
105 source file (the option \fB\-F\fP) is specified.
107 .BR \-M , " \-\-mountpoint \fIpath\fP"
108 Explicitly define the mountpoint file or directory. See also \fB\-\-target\fP.
110 .BR \-m , " \-\-mtab"
113 The output is in the list format by default (see \fB\-\-tree\fP). The output may include user
116 .BR \-N , " \-\-task \fItid\fP"
117 Use alternative namespace /proc/<tid>/mountinfo rather than the default
118 /proc/self/mountinfo. If the option is specified more than once, then
119 tree-like output is disabled (see the \fB\-\-list\fP option). See also the
123 .BR \-n , " \-\-noheadings"
124 Do not print a header line.
126 .BR \-O , " \-\-options \fIlist\fP"
127 Limit the set of printed filesystems. More than one option
128 may be specified in a comma-separated list. The
132 options are cumulative in effect. It is different from
134 in that each option is matched exactly; a leading
136 at the beginning does not have global meaning. The "no" can used for
137 individual items in the list. The "no" prefix interpretation can be disabled
140 .BR \-o , " \-\-output \fIlist\fP"
141 Define output columns. See the \fB\-\-help\fP output to get a list of the
142 currently supported columns. The
144 column contains tree formatting if the
148 options are not specified.
150 The default list of columns may be extended if \fIlist\fP is
151 specified in the format \fI+list\fP (e.g. \fBfindmnt \-o +PROPAGATION\fP).
154 Output almost all available columns. The columns that require
158 .BR \-P , " \-\-pairs"
159 Use key="value" output format. All potentially unsafe characters are hex-escaped (\\x<code>).
161 .BR \-p , " \-\-poll\fR[\fI=list\fR]"
162 Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount,
163 umount, remount and move. More than one action may be specified in a
164 comma-separated list. All actions are monitored by default.
166 The time for which \fB\-\-poll\fR will block can be restricted with the \fB\-\-timeout\fP
167 or \fB\-\-first\-only\fP options.
169 The standard columns always use the new version of the information from the
170 mountinfo file, except the umount action which is based on the original
171 information cached by
173 The poll mode allows to use extra columns:
177 mount, umount, move or remount action name; this column is enabled by default
180 available for umount and move actions
183 available for umount and remount actions
187 Print only pseudo filesystems.
189 .BR \-R , " \-\-submounts"
190 Print recursively all submounts for the selected filesystems. The restrictions
191 defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
192 \fB\%\-\-direction\fP are not applied to submounts. All submounts are always
193 printed in tree-like order. The option enables the tree-like output format by
194 default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
197 Use raw output format. All potentially unsafe characters are hex-escaped (\\x<code>).
200 Print only real filesystems.
202 .BR \-S , " \-\-source \fIspec\fP"
203 Explicitly define the mount source. Supported specifications are \fIdevice\fR,
204 \fImaj\fB:\fImin\fR, \fBLABEL=\fIlabel\fR, \fBUUID=\fIuuid\fR,
205 \fBPARTLABEL=\fIlabel\fR and \fBPARTUUID=\fIuuid\fR.
207 .BR \-s , " \-\-fstab"
210 The output is in the list format (see \fB\-\-list\fR).
212 .BR \-T , " \-\-target \fIpath\fP"
213 Define the mount target. If \fIpath\fR
214 is not a mountpoint file or directory, then
216 checks the \fIpath\fR elements in reverse order to get the mountpoint (this feature is
217 supported only when searching in kernel files and unsupported for \fB\-\-fstab\fP). It's
218 recommended to use the option \fB\-\-mountpoint\fR when checks of \fIpath\fR elements are
219 unwanted and \fIpath\fR is a strictly specified mountpoint.
221 .BR \-t , " \-\-types \fIlist\fP"
222 Limit the set of printed filesystems. More than one type may be
223 specified in a comma-separated list. The list of filesystem types can be
226 to specify the filesystem types on which no action should be taken. For
231 Enable tree-like output if possible. The options is silently ignored for
232 tables where is missing child-parent relation (e.g. fstab).
234 .BR \-U , " \-\-uniq"
235 Ignore filesystems with duplicate mount targets, thus effectively skipping
236 over-mounted mount points.
238 .BR \-u , " \-\-notruncate"
239 Do not truncate text in columns. The default is to not truncate the
246 columns. This option disables text truncation also in all other columns.
248 .BR \-v , " \-\-nofsroot"
249 Do not print a [/dir] in the SOURCE column for bind mounts or btrfs subvolumes.
251 .BR \-w , " \-\-timeout \fImilliseconds\fP"
252 Specify an upper limit on the time for which \fB\-\-poll\fR will block, in milliseconds.
254 .BR \-x , " \-\-verify"
255 Check mount table content. The default is to verify
257 parsability and usability. It's possible to use this option also with \fB\-\-tab\-file\fP.
258 It's possible to specify source (device) or target (mountpoint) to filter mount table. The option
259 \fB\-\-verbose\fP forces findmnt to print more details.
262 Force findmnt to print more information (\fB\-\-verify\fP only for now).
264 .IP "\fBfindmnt \-\-fstab \-t nfs\fP"
265 Prints all NFS filesystems defined in
267 .IP "\fBfindmnt \-\-fstab /mnt/foo\fP"
270 filesystems where the mountpoint directory is /mnt/foo. It also prints bind mounts where /mnt/foo
272 .IP "\fBfindmnt \-\-fstab \-\-target /mnt/foo\fP"
275 filesystems where the mountpoint directory is /mnt/foo.
276 .IP "\fBfindmnt \-\-fstab \-\-evaluate\fP"
279 filesystems and converts LABEL= and UUID= tags to the real device names.
280 .IP "\fBfindmnt \-n \-\-raw \-\-evaluate \-\-output=target LABEL=/boot\fP"
281 Prints only the mountpoint where the filesystem with label "/boot" is mounted.
282 .IP "\fBfindmnt \-\-poll \-\-mountpoint /mnt/foo\fP"
283 Monitors mount, unmount, remount and move on /mnt/foo.
284 .IP "\fBfindmnt \-\-poll=umount \-\-first-only \-\-mountpoint /mnt/foo\fP"
285 Waits for /mnt/foo unmount.
286 .IP "\fBfindmnt \-\-poll=remount \-t ext3 \-O ro\fP"
287 Monitors remounts to read-only mode on all ext3 filesystems.
289 .IP LIBMOUNT_FSTAB=<path>
290 overrides the default location of the fstab file
291 .IP LIBMOUNT_MTAB=<path>
292 overrides the default location of the mtab file
293 .IP LIBMOUNT_DEBUG=all
294 enables libmount debug output
295 .IP LIBSMARTCOLS_DEBUG=all
296 enables libsmartcols debug output
297 .IP LIBSMARTCOLS_DEBUG_PADDING=on
298 use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG.
301 Karel Zak <kzak@redhat.com>
307 The findmnt command is part of the util-linux package and is available from
308 https://www.kernel.org/pub/linux/utils/util-linux/.