1FINDMNT(8) System Administration FINDMNT(8)
2
3
4
6 findmnt - find a filesystem
7
9 findmnt [options]
10
11 findmnt [options] device|mountpoint
12
13 findmnt [options] [--source] device [--target|--mountpoint] mountpoint
14
16 findmnt will list all mounted filesystems or search for a filesystem.
17 The findmnt command is able to search in /etc/fstab, /etc/mtab or
18 /proc/self/mountinfo. If device or mountpoint is not given, all
19 filesystems are shown.
20
21 The device may be specified by device name, major:minor numbers,
22 filesystem label or UUID, or partition label or UUID. Note that
23 findmnt follows mount(8) behavior where a device name may be inter‐
24 preted as a mountpoint (and vice versa) if the --target, --mountpoint
25 or --source options are not specified.
26
27 The command prints all mounted filesystems in the tree-like format by
28 default.
29
31 -A, --all
32 Disable all built-in filters and print all filesystems.
33
34 -a, --ascii
35 Use ascii characters for tree formatting.
36
37 -b, --bytes
38 Print the SIZE, USED and AVAIL columns in bytes rather than in a
39 human-readable format.
40
41 -C, --nocanonicalize
42 Do not canonicalize paths at all. This option affects the com‐
43 paring of paths and the evaluation of tags (LABEL, UUID, etc.).
44
45 -c, --canonicalize
46 Canonicalize all printed paths.
47
48 -D, --df
49 Imitate the output of df(1). This option is equivalent to
50 -o SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all
51 pseudo filesystems. Use --all to print all filesystems.
52
53 -d, --direction word
54 The search direction, either forward or backward.
55
56 -e, --evaluate
57 Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the
58 corresponding device names.
59
60 -F, --tab-file path
61 Search in an alternative file. If used with --fstab, --mtab or
62 --kernel, then it overrides the default paths. If specified
63 more than once, then tree-like output is disabled (see the
64 --list option).
65
66 -f, --first-only
67 Print the first matching filesystem only.
68
69 -h, --help
70 Display help text and exit.
71
72 -i, --invert
73 Invert the sense of matching.
74
75 -J, --json
76 Use JSON output format.
77
78 -k, --kernel
79 Search in /proc/self/mountinfo. The output is in the tree-like
80 format. This is the default. The output contains only mount
81 options maintained by kernel (see also --mtab).
82
83 -l, --list
84 Use the list output format. This output format is automatically
85 enabled if the output is restricted by the -t, -O, -S or -T
86 option and the option --submounts is not used or if more that
87 one source file (the option -F) is specified.
88
89 -M, --mountpoint path
90 Explicitly define the mountpoint file or directory. See also
91 --target.
92
93 -m, --mtab
94 Search in /etc/mtab. The output is in the list format by
95 default (see --tree). The output may include user space mount
96 options.
97
98 -N, --task tid
99 Use alternative namespace /proc/<tid>/mountinfo rather than the
100 default /proc/self/mountinfo. If the option is specified more
101 than once, then tree-like output is disabled (see the --list
102 option). See also the unshare(1) command.
103
104 -n, --noheadings
105 Do not print a header line.
106
107 -O, --options list
108 Limit the set of printed filesystems. More than one option may
109 be specified in a comma-separated list. The -t and -O options
110 are cumulative in effect. It is different from -t in that each
111 option is matched exactly; a leading no at the beginning does
112 not have global meaning. The "no" can used for individual items
113 in the list. The "no" prefix interpretation can be disabled by
114 "+" prefix.
115
116 -o, --output list
117 Define output columns. See the --help output to get a list of
118 the currently supported columns. The TARGET column contains
119 tree formatting if the --list or --raw options are not speci‐
120 fied.
121
122 The default list of columns may be extended if list is specified
123 in the format +list (e.g., findmnt -o +PROPAGATION).
124
125 --output-all
126 Output almost all available columns. The columns that require
127 --poll are not included.
128
129 -P, --pairs
130 Use key="value" output format. All potentially unsafe charac‐
131 ters are hex-escaped (\x<code>).
132
133 -p, --poll[=list]
134 Monitor changes in the /proc/self/mountinfo file. Supported
135 actions are: mount, umount, remount and move. More than one
136 action may be specified in a comma-separated list. All actions
137 are monitored by default.
138
139 The time for which --poll will block can be restricted with the
140 --timeout or --first-only options.
141
142 The standard columns always use the new version of the informa‐
143 tion from the mountinfo file, except the umount action which is
144 based on the original information cached by findmnt(8). The
145 poll mode allows using extra columns:
146
147 ACTION mount, umount, move or remount action name; this column
148 is enabled by default
149
150 OLD-TARGET
151 available for umount and move actions
152
153 OLD-OPTIONS
154 available for umount and remount actions
155
156 --pseudo
157 Print only pseudo filesystems.
158
159 -R, --submounts
160 Print recursively all submounts for the selected filesystems.
161 The restrictions defined by options -t, -O, -S, -T and
162 --direction are not applied to submounts. All submounts are
163 always printed in tree-like order. The option enables the tree-
164 like output format by default. This option has no effect for
165 --mtab or --fstab.
166
167 -r, --raw
168 Use raw output format. All potentially unsafe characters are
169 hex-escaped (\x<code>).
170
171 --real Print only real filesystems.
172
173 -S, --source spec
174 Explicitly define the mount source. Supported specifications
175 are device, maj:min, LABEL=label, UUID=uuid, PARTLABEL=label and
176 PARTUUID=uuid.
177
178 -s, --fstab
179 Search in /etc/fstab. The output is in the list format (see
180 --list).
181
182 -T, --target path
183 Define the mount target. If path is not a mountpoint file or
184 directory, then findmnt checks the path elements in reverse
185 order to get the mountpoint (this feature is supported only when
186 searching in kernel files and unsupported for --fstab). It's
187 recommended to use the option --mountpoint when checks of path
188 elements are unwanted and path is a strictly specified mount‐
189 point.
190
191 -t, --types list
192 Limit the set of printed filesystems. More than one type may be
193 specified in a comma-separated list. The list of filesystem
194 types can be prefixed with no to specify the filesystem types on
195 which no action should be taken. For more details see mount(8).
196
197 --tree Enable tree-like output if possible. The options is silently
198 ignored for tables where is missing child-parent relation (e.g.,
199 fstab).
200
201 -U, --uniq
202 Ignore filesystems with duplicate mount targets, thus effec‐
203 tively skipping over-mounted mount points.
204
205 -u, --notruncate
206 Do not truncate text in columns. The default is to not truncate
207 the TARGET, SOURCE, UUID, LABEL, PARTUUID, PARTLABEL columns.
208 This option disables text truncation also in all other columns.
209
210 -v, --nofsroot
211 Do not print a [/dir] in the SOURCE column for bind mounts or
212 btrfs subvolumes.
213
214 -w, --timeout milliseconds
215 Specify an upper limit on the time for which --poll will block,
216 in milliseconds.
217
218 -x, --verify
219 Check mount table content. The default is to verify /etc/fstab
220 parsability and usability. It's possible to use this option also
221 with --tab-file. It's possible to specify source (device) or
222 target (mountpoint) to filter mount table. The option --verbose
223 forces findmnt to print more details.
224
225 --verbose
226 Force findmnt to print more information (--verify only for now).
227
229 LIBMOUNT_FSTAB=<path>
230 overrides the default location of the fstab file
231
232 LIBMOUNT_MTAB=<path>
233 overrides the default location of the mtab file
234
235 LIBMOUNT_DEBUG=all
236 enables libmount debug output
237
238 LIBSMARTCOLS_DEBUG=all
239 enables libsmartcols debug output
240
241 LIBSMARTCOLS_DEBUG_PADDING=on
242 use visible padding characters. Requires enabled LIBSMART‐
243 COLS_DEBUG.
244
246 findmnt --fstab -t nfs
247 Prints all NFS filesystems defined in /etc/fstab.
248
249 findmnt --fstab /mnt/foo
250 Prints all /etc/fstab filesystems where the mountpoint directory
251 is /mnt/foo. It also prints bind mounts where /mnt/foo is a
252 source.
253
254 findmnt --fstab --target /mnt/foo
255 Prints all /etc/fstab filesystems where the mountpoint directory
256 is /mnt/foo.
257
258 findmnt --fstab --evaluate
259 Prints all /etc/fstab filesystems and converts LABEL= and UUID=
260 tags to the real device names.
261
262 findmnt -n --raw --evaluate --output=target LABEL=/boot
263 Prints only the mountpoint where the filesystem with label
264 "/boot" is mounted.
265
266 findmnt --poll --mountpoint /mnt/foo
267 Monitors mount, unmount, remount and move on /mnt/foo.
268
269 findmnt --poll=umount --first-only --mountpoint /mnt/foo
270 Waits for /mnt/foo unmount.
271
272 findmnt --poll=remount -t ext3 -O ro
273 Monitors remounts to read-only mode on all ext3 filesystems.
274
276 Karel Zak <kzak@redhat.com>
277
279 fstab(5), mount(8)
280
282 The findmnt command is part of the util-linux package and is available
283 from https://www.kernel.org/pub/linux/utils/util-linux/.
284
285
286
287util-linux May 2018 FINDMNT(8)