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
14
16 findmnt will list all mounted filesytems 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, maj:min, filesystem LABEL
22 or UUID, or partition PARTUUID or PARTLABEL. Note that a device name
23 may be interpreted as a mountpoint (and vice versa) if the --target or
24 --source options are not specified.
25
26 The command prints all mounted filesystems in the tree-like format by
27 default.
28
30 -A, --all
31 Disable all built-in filters and print all filesystems.
32
33 -a, --ascii
34 Use ascii characters for tree formatting.
35
36 -c, --canonicalize
37 Canonicalize all printed paths.
38
39 -D, --df
40 Imitate the output of df(1). This option is equivalent to -o
41 SOURCE,FSTYPE,SIZE,USED,AVAIL,USE%,TARGET but excludes all
42 pseudo filesystems. Use --all to print all filesystems.
43
44 -d, --direction word
45 The search direction, either forward or backward.
46
47 -e, --evaluate
48 Convert all tags (LABEL, UUID, PARTUUID or PARTLABEL) to the
49 device names.
50
51 -F, --tab-file path
52 Search in an alternative file. If used with --fstab, --mtab or
53 --kernel, then it overrides the default paths. If specified
54 more than once, then tree-like output is disabled (see the
55 --list option).
56
57 -f, --first-only
58 Print the first matching filesystem only.
59
60 -h, --help
61 Print help and exit.
62
63 -i, --invert
64 Invert the sense of matching.
65
66 -k, --kernel
67 Search in /proc/self/mountinfo. The output is in the tree-like
68 format. This is the default.
69
70 -l, --list
71 Use the list output format. This output format is automatically
72 enabled if the output is restricted by the -t, -O, -S or -T
73 option and the option --submounts is not used or if more that
74 one source file (the option -F) is specified.
75
76 -m, --mtab
77 Search in /etc/mtab. The output is in the list format (see
78 --list).
79
80 -N, --task tid
81 Use alternative namespace /proc/<tid>/mountinfo rather than the
82 default /proc/self/mountinfo. If the option is specified more
83 than once, then tree-like output is disabled (see the --list
84 option). See also the unshare(1) command.
85
86 -n, --noheadings
87 Do not print a header line.
88
89 -O, --options list
90 Limit the set of printed filesystems. More than one option may
91 be specified in a comma-separated list. The -t and -O options
92 are cumulative in effect. It is different from -t in that each
93 option is matched exactly; a leading no at the beginning does
94 not have global meaning. The "no" can used for individual items
95 in the list. The "no" prefix interpretation can be disabled by
96 "+" prefix.
97
98 -o, --output list
99 Define output columns. See the --help output to get a list of
100 the currently supported columns. The TARGET column contains
101 tree formatting if the --list or --raw options are not speci‐
102 fied.
103
104 The default list of columns may be extended if list is specified
105 in the format +list (e.g. findmnt -o +PROPAGATION).
106
107 -P, --pairs
108 Use key="value" output format. All potentially unsafe charac‐
109 ters are hex-escaped (\x<code>).
110
111 -p, --poll[=list]
112 Monitor changes in the /proc/self/mountinfo file. Supported
113 actions are: mount, umount, remount and move. More than one
114 action may be specified in a comma-separated list. All actions
115 are monitored by default.
116
117 The time for which --poll will block can be restricted with the
118 --timeout or --first-only options.
119
120 The standard columns always use the new version of the informa‐
121 tion from the mountinfo file, except the umount action which is
122 based on the original information cached by findmnt(8). The
123 poll mode allows to use extra columns:
124
125 ACTION mount, umount, move or remount action name; this column
126 is enabled by default
127
128 OLD-TARGET
129 available for umount and move actions
130
131 OLD-OPTIONS
132 available for umount and remount actions
133
134 -R, --submounts
135 Print recursively all submounts for the selected filesystems.
136 The restrictions defined by options -t, -O, -S, -T and --direc‐
137 tion are not applied to submounts. All submounts are always
138 printed in tree-like order. The option enables the tree-like
139 output format by default. This option has no effect for --mtab
140 or --fstab.
141
142 -r, --raw
143 Use raw output format. All potentially unsafe characters are
144 hex-escaped (\x<code>).
145
146 -S, --source spec
147 Explicitly define the mount source. Supported are device,
148 maj:min, LABEL=, UUID=, PARTLABEL= or PARTUUID=.
149
150 -s, --fstab
151 Search in /etc/fstab. The output is in the list format (see
152 --list).
153
154 -T, --target path
155 Explicitly define the mount target (mountpoint directory). If
156 the path is not a mountpoint file or directory than findmnt
157 checks path elements in reverse order for get the mountpoint
158 (this feature is supported only if search in kernel files and
159 unsupported for --fstab).
160
161 -t, --types list
162 Limit the set of printed filesystems. More than one type may be
163 specified in a comma-separated list. The list of filesystem
164 types can be prefixed with no to specify the filesystem types on
165 which no action should be taken. For more details see mount(8).
166
167 -u, --notruncate
168 Do not truncate text in columns. The default is to not truncate
169 the TARGET, SOURCE, UUID, LABEL, PARTUUID, PARTLABEL columns.
170 This option disables text truncation also in all other columns.
171
172 -v, --nofsroot
173 Do not print a [/dir] in the SOURCE column for bind-mounts or
174 btrfs subvolumes.
175
176 -w, --timeout milliseconds
177 Specify an upper limit on the time for which --poll will block,
178 in milliseconds.
179
181 findmnt --fstab -t nfs
182 Prints all NFS filesystems defined in /etc/fstab.
183
184 findmnt --fstab /mnt/foo
185 Prints all /etc/fstab filesystems where the mountpoint directory
186 is /mnt/foo. It also prints bind mounts where /mnt/foo is a
187 source.
188
189 findmnt --fstab --target /mnt/foo
190 Prints all /etc/fstab filesystems where the mountpoint directory
191 is /mnt/foo.
192
193 findmnt --fstab --evaluate
194 Prints all /etc/fstab filesystems and converts LABEL= and UUID=
195 tags to the real device names.
196
197 findmnt -n --raw --evaluate --output=target LABEL=/boot
198 Prints only the mountpoint where the filesystem with label
199 "/boot" is mounted.
200
201 findmnt --poll --target /mnt/foo
202 Monitors mount, unmount, remount and move on /mnt/foo.
203
204 findmnt --poll=umount --first-only --target /mnt/foo
205 Waits for /mnt/foo unmount.
206
207 findmnt --poll=remount -t ext3 -O ro
208 Monitors remounts to read-only mode on all ext3 filesystems.
209
211 LIBMOUNT_FSTAB=<path>
212 overrides the default location of the fstab file
213
214 LIBMOUNT_MTAB=<path>
215 overrides the default location of the mtab file
216
217 LIBMOUNT_DEBUG=0xffff
218 enables debug output
219
221 Karel Zak <kzak@redhat.com>
222
224 mount(8), fstab(5)
225
227 The findmnt command is part of the util-linux package and is available
228 from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
229
230
231
232util-linux April 2010 FINDMNT(8)