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|--mountpoint] mountpoint
14

DESCRIPTION

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

OPTIONS

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       -P, --pairs
126              Use key="value" output format.  All potentially  unsafe  charac‐
127              ters are hex-escaped (\x<code>).
128
129       -p, --poll[=list]
130              Monitor  changes  in  the  /proc/self/mountinfo file.  Supported
131              actions are: mount, umount, remount and  move.   More  than  one
132              action  may be specified in a comma-separated list.  All actions
133              are monitored by default.
134
135              The time for which --poll will block can be restricted with  the
136              --timeout or --first-only options.
137
138              The  standard columns always use the new version of the informa‐
139              tion from the mountinfo file, except the umount action which  is
140              based  on  the  original  information cached by findmnt(8).  The
141              poll mode allows to use extra columns:
142
143              ACTION mount, umount, move or remount action name;  this  column
144                     is enabled by default
145
146              OLD-TARGET
147                     available for umount and move actions
148
149              OLD-OPTIONS
150                     available for umount and remount actions
151
152       -R, --submounts
153              Print  recursively  all  submounts for the selected filesystems.
154              The  restrictions  defined  by  options  -t,  -O,  -S,  -T   and
155              --direction  are  not  applied  to submounts.  All submounts are
156              always printed in tree-like order.  The option enables the tree-
157              like  output  format  by default.  This option has no effect for
158              --mtab or --fstab.
159
160       -r, --raw
161              Use raw output format.  All potentially  unsafe  characters  are
162              hex-escaped (\x<code>).
163
164       -S, --source spec
165              Explicitly  define  the  mount source.  Supported specifications
166              are device, maj:min, LABEL=label, UUID=uuid, PARTLABEL=label and
167              PARTUUID=uuid.
168
169       -s, --fstab
170              Search  in  /etc/fstab.   The  output is in the list format (see
171              --list).
172
173       -T, --target path
174              Define the mount target.  If path is not a  mountpoint  file  or
175              directory,  then  findmnt  checks  the  path elements in reverse
176              order to get the mountpoint (this feature is supported only when
177              searching  in  kernel  files and unsupported for --fstab).  It's
178              recommended to use the option --mountpoint when checks  of  path
179              elements  are  unwanted  and path is a strictly specified mount‐
180              point.
181
182       -t, --types list
183              Limit the set of printed filesystems.  More than one type may be
184              specified  in  a  comma-separated  list.  The list of filesystem
185              types can be prefixed with no to specify the filesystem types on
186              which no action should be taken.  For more details see mount(8).
187
188       --tree Enable  tree-like  output  if possible.  The options is silently
189              ignored for tables where is missing child-parent relation  (e.g.
190              fstab).
191
192       -U, --uniq
193              Ignore  filesystems  with  duplicate  mount targets, thus effec‐
194              tively skipping over-mounted mount points.
195
196       -u, --notruncate
197              Do not truncate text in columns.  The default is to not truncate
198              the  TARGET,  SOURCE,  UUID, LABEL, PARTUUID, PARTLABEL columns.
199              This option disables text truncation also in all other columns.
200
201       -v, --nofsroot
202              Do not print a [/dir] in the SOURCE column for  bind  mounts  or
203              btrfs subvolumes.
204
205       -w, --timeout milliseconds
206              Specify  an upper limit on the time for which --poll will block,
207              in milliseconds.
208
209       -x, --verify
210              Check mount table content. The default is to  verify  /etc/fstab
211              parsability and usability. It's possible to use this option also
212              with --tab-file.  It's possible to specify  source  (device)  or
213              target  (mountpoint) to filter mount table. The option --verbose
214              forces findmnt to print more details.
215
216       --verbose
217              Force findmnt to print more information (--verify only for now).
218

EXAMPLES

220       findmnt --fstab -t nfs
221              Prints all NFS filesystems defined in /etc/fstab.
222
223       findmnt --fstab /mnt/foo
224              Prints all /etc/fstab filesystems where the mountpoint directory
225              is  /mnt/foo.   It  also  prints bind mounts where /mnt/foo is a
226              source.
227
228       findmnt --fstab --target /mnt/foo
229              Prints all /etc/fstab filesystems where the mountpoint directory
230              is /mnt/foo.
231
232       findmnt --fstab --evaluate
233              Prints  all /etc/fstab filesystems and converts LABEL= and UUID=
234              tags to the real device names.
235
236       findmnt -n --raw --evaluate --output=target LABEL=/boot
237              Prints only the  mountpoint  where  the  filesystem  with  label
238              "/boot" is mounted.
239
240       findmnt --poll --mountpoint /mnt/foo
241              Monitors mount, unmount, remount and move on /mnt/foo.
242
243       findmnt --poll=umount --first-only --mountpoint /mnt/foo
244              Waits for /mnt/foo unmount.
245
246       findmnt --poll=remount -t ext3 -O ro
247              Monitors remounts to read-only mode on all ext3 filesystems.
248

ENVIRONMENT

250       LIBMOUNT_FSTAB=<path>
251              overrides the default location of the fstab file
252
253       LIBMOUNT_MTAB=<path>
254              overrides the default location of the mtab file
255
256       LIBMOUNT_DEBUG=all
257              enables libmount debug output
258
259       LIBSMARTCOLS_DEBUG=all
260              enables libsmartcols debug output
261
262       LIBSMARTCOLS_DEBUG_PADDING=on
263              use  visible  padding  characters.  Requires  enabled  LIBSMART‐
264              COLS_DEBUG.
265

AUTHORS

267       Karel Zak <kzak@redhat.com>
268

SEE ALSO

270       fstab(5), mount(8)
271

AVAILABILITY

273       The findmnt command is part of the util-linux package and is  available
274       from https://www.kernel.org/pub/linux/utils/util-linux/.
275
276
277
278util-linux                         June 2015                        FINDMNT(8)
Impressum