]> git.ipfire.org Git - thirdparty/util-linux.git/blob - sys-utils/mount.8
mount.8: clarify (no)suid behavior on file capabilities
[thirdparty/util-linux.git] / sys-utils / mount.8
1 .\" Copyright (c) 1996-2004 Andries Brouwer
2 .\" Copyright (C) 2006-2012 Karel Zak <kzak@redhat.com>
3 .\"
4 .\" This page is somewhat derived from a page that was
5 .\" (c) 1980, 1989, 1991 The Regents of the University of California
6 .\" and had been heavily modified by Rik Faith and myself.
7 .\" (Probably no BSD text remains.)
8 .\" Fragments of text were written by Werner Almesberger, Remy Card,
9 .\" Stephen Tweedie and Eric Youngdale.
10 .\"
11 .\" This is free documentation; you can redistribute it and/or
12 .\" modify it under the terms of the GNU General Public License as
13 .\" published by the Free Software Foundation; either version 2 of
14 .\" the License, or (at your option) any later version.
15 .\"
16 .\" The GNU General Public License's references to "object code"
17 .\" and "executables" are to be interpreted as the output of any
18 .\" document formatting or typesetting system, including
19 .\" intermediate and printed output.
20 .\"
21 .\" This manual is distributed in the hope that it will be useful,
22 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
23 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 .\" GNU General Public License for more details.
25 .\"
26 .\" You should have received a copy of the GNU General Public License along
27 .\" with this program; if not, write to the Free Software Foundation, Inc.,
28 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
29 .\"
30 .TH MOUNT 8 "August 2015" "util-linux" "System Administration"
31 .SH NAME
32 mount \- mount a filesystem
33 .SH SYNOPSIS
34 .B mount
35 .RB [ \-l | \-h | \-V ]
36 .LP
37 .B mount \-a
38 .RB [ \-fFnrsvw ]
39 .RB [ \-t
40 .IR fstype ]
41 .RB [ \-O
42 .IR optlist ]
43 .LP
44 .B mount
45 .RB [ \-fnrsvw ]
46 .RB [ \-o
47 .IR options ]
48 .IR device | dir
49 .LP
50 .B mount
51 .RB [ \-fnrsvw ]
52 .RB [ \-t
53 .IB fstype ]
54 .RB [ \-o
55 .IR options ]
56 .I device dir
57 .SH DESCRIPTION
58 All files accessible in a Unix system are arranged in one big
59 tree, the file hierarchy, rooted at
60 .IR / .
61 These files can be spread out over several devices. The
62 .B mount
63 command serves to attach the filesystem found on some device
64 to the big file tree. Conversely, the
65 .BR umount (8)
66 command will detach it again. The filesystem is used to control how data is
67 stored on the device or provided in a virtual way by network or another services.
68
69 The standard form of the
70 .B mount
71 command is:
72 .RS
73
74 .br
75 .BI "mount \-t" " type device dir"
76 .br
77
78 .RE
79 This tells the kernel to attach the filesystem found on
80 .I device
81 (which is of type
82 .IR type )
83 at the directory
84 .IR dir .
85 The option \fB\-t \fItype\fR is optional. The
86 .B mount
87 command is usually able to detect a filesystem. The root permissions are necessary
88 to mount a filesystem by default. See section "Non-superuser mounts" below for more details.
89 The previous contents (if any) and owner and mode of
90 .I dir
91 become invisible, and as long as this filesystem remains mounted,
92 the pathname
93 .I dir
94 refers to the root of the filesystem on
95 .IR device .
96
97 If only the directory or the device is given, for example:
98 .RS
99 .sp
100 .B mount /dir
101 .sp
102 .RE
103 then \fBmount\fR looks for a mountpoint (and if not found then for a device) in the
104 .I /etc/fstab
105 file. It's possible to use the
106 .B \-\-target
107 or
108 .B \-\-source
109 options to avoid ambivalent interpretation of the given argument. For example:
110 .RS
111 .sp
112 .B mount \-\-target /mountpoint
113 .sp
114 .RE
115
116 The same filesystem may be mounted more than once, and in some cases (e.g.
117 network filesystems) the same filesystem maybe be mounted on the same
118 mountpoint more times. The mount command does not implement any policy to
119 control this behavior. All behavior is controlled by kernel and it is usually
120 specific to filesystem driver. The exception is \fB\-\-all\fR, in this case
121 already mounted filesystems are ignored (see \fB\-\-all\fR below for more details).
122
123 .SS Listing the mounts
124 The listing mode is maintained for backward compatibility only.
125
126 For more robust and customizable output use
127 .BR findmnt (8),
128 \fBespecially in your scripts\fP. Note that control characters in the
129 mountpoint name are replaced with '?'.
130
131 The following command lists all mounted filesystems (of type
132 .IR type ):
133 .RS
134 .sp
135 .BR "mount " [ \-l "] [" "\-t \fItype\/\fP" ]
136 .sp
137 .RE
138 The option \fB\-l\fR adds labels to this listing. See below.
139
140 .SS Indicating the device and filesystem
141 Most devices are indicated by a filename (of a block special device), like
142 .IR /dev/sda1 ,
143 but there are other possibilities. For example, in the case of an NFS mount,
144 .I device
145 may look like
146 .IR knuth.cwi.nl:/dir .
147 It is also possible to indicate a block special device using its filesystem label
148 or UUID (see the \fB\-L\fR and \fB\-U\fR options below), or its partition label
149 or UUID. Partition identifiers are supported for example for GUID Partition
150 Tables (GPT).
151
152 The device name of disk partitions are unstable; hardware reconfiguration,
153 adding or removing a device can cause change in names. This is reason why it's
154 strongly recommended to use filesystem or partition identificators like UUID or
155 LABEL.
156
157 The command \fBlsblk --fs\fR provides overview of filesystems, LABELs and UUIDs
158 on available block devices. The command \fBblkid -p <device>\fR provides details about
159 a filesystem on the specified device.
160
161 Don't forget that there is no guarantee that UUIDs and labels are really
162 unique, especially if you move, share or copy the device. Use
163 .B "lsblk \-o +UUID,PARTUUID"
164 to verify that the UUIDs are really unique in your system.
165
166 The recommended setup is to use tags (e.g.\& \fBUUID=\fIuuid\fR) rather than
167 .I /dev/disk/by-{label,uuid,partuuid,partlabel}
168 udev symlinks in the
169 .I /etc/fstab
170 file. Tags are
171 more readable, robust and portable. The
172 .BR mount (8)
173 command internally uses udev
174 symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
175 For more details see
176 .BR libblkid (3).
177
178 Note that
179 .BR mount (8)
180 uses UUIDs as strings. The UUIDs from the command line or from
181 .BR fstab (5)
182 are not converted to internal binary representation. The string representation
183 of the UUID should be based on lower case characters.
184
185 The
186 .I proc
187 filesystem is not associated with a special device, and when
188 mounting it, an arbitrary keyword, such as
189 .I proc
190 can be used instead of a device specification.
191 (The customary choice
192 .I none
193 is less fortunate: the error message `none already mounted' from
194 .B mount
195 can be confusing.)
196
197 .SS The files /etc/fstab, /etc/mtab and /proc/mounts
198 The file
199 .I /etc/fstab
200 (see
201 .BR fstab (5)),
202 may contain lines describing what devices are usually
203 mounted where, using which options. The default location of the
204 .BR fstab (5)
205 file can be overridden with the
206 .BI \-\-fstab " path"
207 command-line option (see below for more details).
208 .LP
209 The command
210 .RS
211 .sp
212 .B mount \-a
213 .RB [ \-t
214 .IR type ]
215 .RB [ \-O
216 .IR optlist ]
217 .sp
218 .RE
219 (usually given in a bootscript) causes all filesystems mentioned in
220 .I fstab
221 (of the proper type and/or having or not having the proper options)
222 to be mounted as indicated, except for those whose line contains the
223 .B noauto
224 keyword. Adding the
225 .B \-F
226 option will make \fBmount\fR fork, so that the
227 filesystems are mounted simultaneously.
228 .LP
229 When mounting a filesystem mentioned in
230 .I fstab
231 or
232 .IR mtab ,
233 it suffices to specify on the command line only the device, or only the mount point.
234 .sp
235 The programs
236 .B mount
237 and
238 .B umount
239 traditionally maintained a list of currently mounted filesystems in the file
240 .IR /etc/mtab .
241 The support for regular classic
242 .I /etc/mtab
243 is completely disabled in compile time by default, because on current Linux
244 systems it is better to make it a symlink to
245 .I /proc/mounts
246 instead. The regular mtab file maintained in userspace cannot reliably
247 work with namespaces, containers and other advanced Linux features.
248 If the regular mtab support is enabled than it's possible to
249 use the file as well as the symlink.
250 .sp
251 If no arguments are given to
252 .BR mount ,
253 the list of mounted filesystems is printed.
254 .sp
255 If you want to override mount options from
256 .I /etc/fstab
257 you have to use the \fB\-o\fR option:
258 .RS
259 .sp
260 .BI mount " device" \fR| "dir " \-o " options"
261 .sp
262 .RE
263 and then the mount options from the command line will be appended to
264 the list of options from
265 .IR /etc/fstab .
266 This default behaviour is possible to change by command line
267 option \fB\-\-options\-mode\fR.
268 The usual behavior is that the last option wins if there are conflicting
269 ones.
270 .sp
271 The
272 .B mount
273 program does not read the
274 .I /etc/fstab
275 file if both
276 .I device
277 (or LABEL, UUID, PARTUUID or PARTLABEL) and
278 .I dir
279 are specified. For example, to mount device
280 .BR foo " at " /dir :
281 .RS
282 .sp
283 .B "mount /dev/foo /dir"
284 .sp
285 .RE
286 This default behaviour is possible to change by command line option
287 \fB\-\-options\-source\-force\fR to always read configuration from fstab. For
288 non-root users
289 .B mount
290 always read fstab configuration.
291
292 .SS Non-superuser mounts
293 Normally, only the superuser can mount filesystems.
294 However, when
295 .I fstab
296 contains the
297 .B user
298 option on a line, anybody can mount the corresponding filesystem.
299 .LP
300 Thus, given a line
301 .RS
302 .sp
303 .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
304 .sp
305 .RE
306 any user can mount the iso9660 filesystem found on an inserted CDROM
307 using the command:
308 .RS
309 .B "mount /cd"
310 .sp
311 .RE
312 Note that \fBmount\fR is very strict about non-root users and all paths
313 specified on command line are verified before fstab is parsed or a helper
314 program is executed. It's strongly recommended to use a valid mountpoint to
315 specify filesystem, otherwise \fBmount\fR may fail. For example it's bad idea
316 to use NFS or CIFS source on command line.
317 .PP
318 For more details, see
319 .BR fstab (5).
320 Only the user that mounted a filesystem can unmount it again.
321 If any user should be able to unmount it, then use
322 .B users
323 instead of
324 .B user
325 in the
326 .I fstab
327 line.
328 The
329 .B owner
330 option is similar to the
331 .B user
332 option, with the restriction that the user must be the owner
333 of the special file. This may be useful e.g.\& for
334 .I /dev/fd
335 if a login script makes the console user owner of this device.
336 The
337 .B group
338 option is similar, with the restriction that the user must be
339 member of the group of the special file.
340
341 .SS Bind mount operation
342 Remount part of the file hierarchy somewhere else. The call is:
343
344 .RS
345 .br
346 .B mount \-\-bind
347 .I olddir newdir
348 .RE
349
350 or by using this fstab entry:
351
352 .RS
353 .br
354 .BI / olddir
355 .BI / newdir
356 .B none bind
357 .RE
358
359 After this call the same contents are accessible in two places.
360
361 It is important to understand that "bind" does not to create any second-class
362 or special node in the kernel VFS. The "bind" is just another operation to
363 attach a filesystem. There is nowhere stored information that the filesystem
364 has been attached by "bind" operation. The \fIolddir\fR and \fInewdir\fR are
365 independent and the \fIolddir\fR maybe be umounted.
366
367 One can also remount a single file (on a single file). It's also
368 possible to use the bind mount to create a mountpoint from a regular
369 directory, for example:
370
371 .RS
372 .br
373 .B mount \-\-bind foo foo
374 .RE
375
376 The bind mount call attaches only (part of) a single filesystem, not possible
377 submounts. The entire file hierarchy including submounts is attached
378 a second place by using:
379
380 .RS
381 .br
382 .B mount \-\-rbind
383 .I olddir newdir
384 .RE
385
386 Note that the filesystem mount options maintained by kernel will remain the same as those
387 on the original mount point. The userspace mount options (e.g. _netdev) will not be copied
388 by
389 .BR mount (8)
390 and it's necessary explicitly specify the options on mount command line.
391
392 .BR mount (8)
393 since v2.27 allows to change the mount options by passing the
394 relevant options along with
395 .BR \-\-bind .
396 For example:
397
398 .RS
399 .br
400 .B mount -o bind,ro foo foo
401 .RE
402
403 This feature is not supported by the Linux kernel; it is implemented in userspace
404 by an additional \fBmount\fR(2) remounting system call.
405 This solution is not atomic.
406
407 The alternative (classic) way to create a read-only bind mount is to use the remount
408 operation, for example:
409
410 .RS
411 .br
412 .B mount \-\-bind
413 .I olddir newdir
414 .br
415 .B mount \-o remount,bind,ro
416 .I olddir newdir
417 .RE
418
419 Note that a read-only bind will create a read-only mountpoint (VFS entry),
420 but the original filesystem superblock will still be writable, meaning that the
421 .I olddir
422 will be writable, but the
423 .I newdir
424 will be read-only.
425
426 It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
427 relatime VFS entry flags by "remount,bind" operation. The another (for example
428 filesystem specific flags) are silently ignored. It's impossible to change mount
429 options recursively (for example with \fB-o rbind,ro\fR).
430
431 .BR mount (8)
432 since v2.31 ignores the \fBbind\fR flag from
433 .I /etc/fstab
434 on
435 .B remount operation
436 (if "-o remount" specified on command line). This is necessary to fully control
437 mount options on remount by command line. In the previous versions the bind
438 flag has been always applied and it was impossible to re-define mount options
439 without interaction with the bind semantic. This
440 .BR mount (8)
441 behavior does not affect situations when "remount,bind" is specified in the
442 .I /etc/fstab
443 file.
444 .RE
445
446 .SS The move operation
447 Move a
448 .B mounted tree
449 to another place (atomically). The call is:
450
451 .RS
452 .br
453 .B mount \-\-move
454 .I olddir newdir
455 .RE
456
457 This will cause the contents which previously appeared under
458 .I olddir
459 to now be accessible under
460 .IR newdir .
461 The physical location of the files is not changed.
462 Note that
463 .I olddir
464 has to be a mountpoint.
465
466 Note also that moving a mount residing under a shared mount is invalid and
467 unsupported. Use
468 .B findmnt \-o TARGET,PROPAGATION
469 to see the current propagation flags.
470
471 .SS Shared subtree operations
472 Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
473 private, slave or unbindable. A shared mount provides the ability to create mirrors
474 of that mount such that mounts and unmounts within any of the mirrors propagate
475 to the other mirror. A slave mount receives propagation from its master, but
476 not vice versa. A private mount carries no propagation abilities. An
477 unbindable mount is a private mount which cannot be cloned through a bind
478 operation. The detailed semantics are documented in
479 .I Documentation/filesystems/sharedsubtree.txt
480 file in the kernel source tree.
481
482 Supported operations are:
483
484 .RS
485 .nf
486 .BI "mount \-\-make\-shared " mountpoint
487 .BI "mount \-\-make\-slave " mountpoint
488 .BI "mount \-\-make\-private " mountpoint
489 .BI "mount \-\-make\-unbindable " mountpoint
490 .fi
491 .RE
492
493 The following commands allow one to recursively change the type of all the
494 mounts under a given mountpoint.
495
496 .RS
497 .nf
498 .BI "mount \-\-make\-rshared " mountpoint
499 .BI "mount \-\-make\-rslave " mountpoint
500 .BI "mount \-\-make\-rprivate " mountpoint
501 .BI "mount \-\-make\-runbindable " mountpoint
502 .fi
503 .RE
504
505 .BR mount (8)
506 .B does not read
507 .BR fstab (5)
508 when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
509 specified on the command line.
510
511 Note that the Linux kernel does not allow to change multiple propagation flags
512 with a single
513 .BR mount (2)
514 system call, and the flags cannot be mixed with other mount options and operations.
515
516 Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
517 (topology) changes by one mount(8) call and do it also together with other
518 mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
519 by additional \fBmount\fR(2) system calls when the preceding mount operations
520 were successful. Note that this use case is not atomic. It is possible to
521 specify the propagation flags in
522 .BR fstab (5)
523 as mount options
524 .RB ( private ,
525 .BR slave ,
526 .BR shared ,
527 .BR unbindable ,
528 .BR rprivate ,
529 .BR rslave ,
530 .BR rshared ,
531 .BR runbindable ).
532
533 For example:
534
535 .RS
536 .nf
537 .B mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo
538 .fi
539 .RE
540
541 is the same as:
542
543 .RS
544 .nf
545 .B mount /dev/sda1 /foox
546 .B mount \-\-make\-private /foo
547 .B mount \-\-make\-unbindable /foo
548 .fi
549 .RE
550
551 .SH COMMAND-LINE OPTIONS
552 The full set of mount options used by an invocation of
553 .B mount
554 is determined by first extracting the
555 mount options for the filesystem from the
556 .I fstab
557 table, then applying any options specified by the
558 .B \-o
559 argument, and finally applying a
560 .BR \-r " or " \-w
561 option, when present.
562
563 The command \fBmount\fR does not pass all command-line options to the
564 \fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
565 and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
566 .sp
567 Command-line options available for the
568 .B mount
569 command are:
570 .TP
571 .BR \-a , " \-\-all"
572 Mount all filesystems (of the given types) mentioned in
573 .I fstab
574 (except for those whose line contains the
575 .B noauto
576 keyword). The filesystems are mounted following their order in
577 .IR fstab .
578 The mount command compares filesystem source, target (and fs root for bind
579 mount or btrfs) to detect already mounted filesystems. The kernel table with
580 already mounted filesystems is cached during \fBmount \-\-all\fR. It means
581 that all duplicated fstab entries will be mounted.
582 .sp
583 Note that it is a bad practice to use \fBmount \-a\fR for
584 .I fstab
585 checking. The recommended solution is \fBfindmnt \-\-verify\fR.
586 .TP
587 .BR \-B , " \-\-bind"
588 Remount a subtree somewhere else (so that its contents are available
589 in both places). See above, under \fBBind mounts\fR.
590 .TP
591 .BR \-c , " \-\-no\-canonicalize"
592 Don't canonicalize paths. The mount command canonicalizes all paths
593 (from command line or fstab) by default. This option can be used
594 together with the
595 .B \-f
596 flag for already canonicalized absolute paths. The option is designed for mount
597 helpers which call \fBmount -i\fR. It is strongly recommended to not use this
598 command-line option for normal mount operations.
599 .sp
600 Note that \fBmount\fR(8) does not pass this option to the
601 \fB/sbin/mount.\fItype\fR helpers.
602 .TP
603 .BR \-F , " \-\-fork"
604 (Used in conjunction with
605 .BR \-a .)
606 Fork off a new incarnation of \fBmount\fR for each device.
607 This will do the mounts on different devices or different NFS servers
608 in parallel.
609 This has the advantage that it is faster; also NFS timeouts go in
610 parallel. A disadvantage is that the mounts are done in undefined order.
611 Thus, you cannot use this option if you want to mount both
612 .I /usr
613 and
614 .IR /usr/spool .
615 .IP "\fB\-f, \-\-fake\fP"
616 Causes everything to be done except for the actual system call; if it's not
617 obvious, this ``fakes'' mounting the filesystem. This option is useful in
618 conjunction with the
619 .B \-v
620 flag to determine what the
621 .B mount
622 command is trying to do. It can also be used to add entries for devices
623 that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
624 checks for an existing record in /etc/mtab and fails when the record already
625 exists (with a regular non-fake mount, this check is done by the kernel).
626 .IP "\fB\-i, \-\-internal\-only\fP"
627 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
628 .TP
629 .BR \-L , " \-\-label " \fIlabel
630 Mount the partition that has the specified
631 .IR label .
632 .TP
633 .BR \-l , " \-\-show\-labels"
634 Add the labels in the mount output. \fBmount\fR must have
635 permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
636 One can set such a label for ext2, ext3 or ext4 using the
637 .BR e2label (8)
638 utility, or for XFS using
639 .BR xfs_admin (8),
640 or for reiserfs using
641 .BR reiserfstune (8).
642 .TP
643 .BR \-M , " \-\-move"
644 Move a subtree to some other place. See above, the subsection
645 \fBThe move operation\fR.
646 .TP
647 .BR \-n , " \-\-no\-mtab"
648 Mount without writing in
649 .IR /etc/mtab .
650 This is necessary for example when
651 .I /etc
652 is on a read-only filesystem.
653 .TP
654 .BR \-N , " \-\-namespace " \fIns
655 Perform mount in namespace specified by \fIns\fR.
656 \fIns\fR is either PID of process running in that namespace
657 or special file representing that namespace.
658 .sp
659 .BR mount (8)
660 switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
661 .BR mount (2)
662 system call, otherwise it runs in the original namespace. It means that the target namespace does not have
663 to contain any libraries or another requirements necessary to execute
664 .BR mount (2)
665 command.
666 .sp
667 See \fBnamespaces\fR(7) for more information.
668 .TP
669 .BR \-O , " \-\-test\-opts " \fIopts
670 Limit the set of filesystems to which the
671 .B \-a
672 option applies. In this regard it is like the
673 .B \-t
674 option except that
675 .B \-O
676 is useless without
677 .BR \-a .
678 For example, the command:
679 .RS
680 .RS
681 .sp
682 .B "mount \-a \-O no_netdev"
683 .sp
684 .RE
685 mounts all filesystems except those which have the option
686 .I _netdev
687 specified in the options field in the
688 .I /etc/fstab
689 file.
690
691 It is different from
692 .B \-t
693 in that each option is matched exactly; a leading
694 .B no
695 at the beginning of one option does not negate the rest.
696
697 The
698 .B \-t
699 and
700 .B \-O
701 options are cumulative in effect; that is, the command
702 .RS
703 .sp
704 .B "mount \-a \-t ext2 \-O _netdev"
705 .sp
706 .RE
707 mounts all ext2 filesystems with the _netdev option, not all filesystems
708 that are either ext2 or have the _netdev option specified.
709 .RE
710 .TP
711 .BR \-o , " \-\-options " \fIopts
712 Use the specified mount options. The \fIopts\fR argument is
713 a comma-separated list. For example:
714 .RS
715 .RS
716 .sp
717 .B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
718 .sp
719 .RE
720
721 For more details, see the
722 .B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
723 and
724 .B FILESYSTEM-SPECIFIC MOUNT OPTIONS
725 sections.
726 .RE
727
728 .TP
729 .BR "\-\-options\-mode " \fImode
730 Controls how to combine options from fstab/mtab with options from command line.
731 \fImode\fR can be one of
732 .BR ignore ", " append ", " prepend " or " replace .
733 For example \fBappend\fR means that options from fstab are appended to options from command line.
734 Default value is \fBprepend\fR -- it means command line options are evaluated after fstab options.
735 Note that the last option wins if there are conflicting ones.
736
737 .TP
738 .BR "\-\-options\-source " \fIsource
739 Source of default options.
740 \fIsource\fR is comma separated list of
741 .BR fstab ", " mtab " and " disable .
742 \fBdisable\fR disables
743 .BR fstab " and " mtab
744 and disables \fB\-\-options\-source\-force\fR.
745 Default value is \fBfstab,mtab\fR.
746
747 .TP
748 .B \-\-options\-source\-force
749 Use options from fstab/mtab even if both \fIdevice\fR and \fIdir\fR are specified.
750
751 .TP
752 .BR \-R , " \-\-rbind"
753 Remount a subtree and all possible submounts somewhere else (so that its
754 contents are available in both places). See above, the subsection
755 \fBBind mounts\fR.
756 .TP
757 .BR \-r , " \-\-read\-only"
758 Mount the filesystem read-only. A synonym is
759 .BR "\-o ro" .
760 .sp
761 Note that, depending on the filesystem type, state and kernel behavior, the
762 system may still write to the device. For example, ext3 and ext4 will replay the
763 journal if the filesystem is dirty. To prevent this kind of write access, you
764 may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
765 options or set the block device itself to read-only mode, see the
766 .BR blockdev (8)
767 command.
768 .TP
769 .B \-s
770 Tolerate sloppy mount options rather than failing. This will ignore mount
771 options not supported by a filesystem type. Not all filesystems support this
772 option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
773 .TP
774 .BI \-\-source " device"
775 If only one argument for the mount command is given then the argument might be
776 interpreted as target (mountpoint) or source (device). This option allows to
777 explicitly define that the argument is the mount source.
778 .TP
779 .BI \-\-target " directory"
780 If only one argument for the mount command is given then the argument might be
781 interpreted as target (mountpoint) or source (device). This option allows to
782 explicitly define that the argument is the mount target.
783 .TP
784 .BR \-T , " \-\-fstab " \fIpath
785 Specifies an alternative fstab file. If \fIpath\fP is a directory then the files
786 in the directory are sorted by
787 .BR strverscmp (3);
788 files that start with "."\& or without an \&.fstab extension are ignored. The option
789 can be specified more than once. This option is mostly designed for initramfs
790 or chroot scripts where additional configuration is specified beyond standard
791 system configuration.
792 .sp
793 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
794 \fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
795 invisible for the helpers. This is no problem for normal mounts, but user
796 (non-root) mounts always require fstab to verify the user's rights.
797 .TP
798 .BR \-t , " \-\-types " \fIfstype
799 The argument following the
800 .B \-t
801 is used to indicate the filesystem type. The filesystem types which are
802 currently supported depend on the running kernel. See
803 .I /proc/filesystems
804 and
805 .I /lib/modules/$(uname -r)/kernel/fs
806 for a complete list of the filesystems. The most common are ext2, ext3, ext4,
807 xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
808 .sp
809 The programs
810 .B mount
811 and
812 .B umount
813 support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
814 example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
815 any prefix to the mount source (for example 'sshfs#example.com' is
816 deprecated).
817
818 If no
819 .B \-t
820 option is given, or if the
821 .B auto
822 type is specified, mount will try to guess the desired type.
823 Mount uses the blkid library for guessing the filesystem
824 type; if that does not turn up anything that looks familiar,
825 mount will try to read the file
826 .IR /etc/filesystems ,
827 or, if that does not exist,
828 .IR /proc/filesystems .
829 All of the filesystem types listed there will be tried,
830 except for those that are labeled "nodev" (e.g.\&
831 .IR devpts ,
832 .I proc
833 and
834 .IR nfs ).
835 If
836 .I /etc/filesystems
837 ends in a line with a single *, mount will read
838 .I /proc/filesystems
839 afterwards. While trying, all filesystem types will be
840 mounted with the mount option \fBsilent\fR.
841 .sp
842 The
843 .B auto
844 type may be useful for user-mounted floppies.
845 Creating a file
846 .I /etc/filesystems
847 can be useful to change the probe order (e.g., to try vfat before msdos
848 or ext3 before ext2) or if you use a kernel module autoloader.
849 .sp
850 More than one type may be specified in a comma-separated
851 list, for option
852 .B \-t
853 as well as in an
854 .I /etc/fstab
855 entry. The list of filesystem types for option
856 .B \-t
857 can be prefixed with
858 .B no
859 to specify the filesystem types on which no action should be taken.
860 The prefix
861 .B no
862 has no effect when specified in an
863 .I /etc/fstab
864 entry.
865 .sp
866 The prefix
867 .B no
868 can be meaningful with the
869 .B \-a
870 option. For example, the command
871 .RS
872 .RS
873 .sp
874 .B "mount \-a \-t nomsdos,smbfs"
875 .sp
876 .RE
877 mounts all filesystems except those of type
878 .I msdos
879 and
880 .IR smbfs .
881 .sp
882 For most types all the
883 .B mount
884 program has to do is issue a simple
885 .BR mount (2)
886 system call, and no detailed knowledge of the filesystem type is required.
887 For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
888 necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
889 have a separate mount program. In order to make it possible to
890 treat all types in a uniform way, \fBmount\fR will execute the program
891 .BI /sbin/mount. type
892 (if that exists) when called with type
893 .IR type .
894 Since different versions of the
895 .B smbmount
896 program have different calling conventions,
897 .B /sbin/mount.smbfs
898 may have to be a shell script that sets up the desired call.
899 .RE
900 .TP
901 .BR \-U , " \-\-uuid " \fIuuid
902 Mount the partition that has the specified
903 .IR uuid .
904 .TP
905 .BR \-v , " \-\-verbose"
906 Verbose mode.
907 .TP
908 .BR \-w , " \-\-rw" , " \-\-read\-write"
909 Mount the filesystem read/write. The read-write is kernel default. A synonym is
910 .BR "\-o rw" .
911
912 Note that specify \fB\-w\fR on command line forces \fBmount\fR command
913 to never try read-only mount on write-protected devices. The default is
914 try read-only if the previous mount syscall with read-write flags failed.
915 .TP
916 .BR \-V , " \-\-version"
917 Display version information and exit.
918 .TP
919 .BR \-h , " \-\-help"
920 Display help text and exit.
921
922 .SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
923 Some of these options are only useful when they appear in the
924 .I /etc/fstab
925 file.
926
927 Some of these options could be enabled or disabled by default
928 in the system kernel. To check the current setting see the options
929 in /proc/mounts. Note that filesystems also have per-filesystem
930 specific default mount options (see for example \fBtune2fs \-l\fP
931 output for extN filesystems).
932
933 The following options apply to any filesystem that is being
934 mounted (but not every filesystem actually honors them \(en e.g.\&, the
935 .B sync
936 option today has an effect only for ext2, ext3, ext4, fat, vfat and ufs):
937
938 .TP
939 .B async
940 All I/O to the filesystem should be done asynchronously. (See also the
941 .B sync
942 option.)
943 .TP
944 .B atime
945 Do not use the \fBnoatime\fR feature, so the inode access time is controlled
946 by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
947 .B strictatime
948 mount options.
949 .TP
950 .B noatime
951 Do not update inode access times on this filesystem (e.g.\& for faster
952 access on the news spool to speed up news servers). This works for all
953 inode types (directories too), so it implies \fB\%nodiratime\fR.
954 .TP
955 .B auto
956 Can be mounted with the
957 .B \-a
958 option.
959 .TP
960 .B noauto
961 Can only be mounted explicitly (i.e., the
962 .B \-a
963 option will not cause the filesystem to be mounted).
964 .TP
965 .na
966 .BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
967 .ad
968 The
969 .B context=
970 option is useful when mounting filesystems that do not support
971 extended attributes, such as a floppy or hard disk formatted with VFAT, or
972 systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
973
974 disk from a non-SELinux workstation. You can also use
975 .B context=
976 on filesystems you do not trust, such as a floppy. It also helps in compatibility with
977 xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
978 xattrs are supported, you can save time not having to label every file by
979 assigning the entire disk one security context.
980
981 A commonly used option for removable media is
982 .BR \%context="system_u:object_r:removable_t" .
983
984 Two other options are
985 .B fscontext=
986 and
987 .BR defcontext= ,
988 both of which are mutually exclusive of the context option. This means you
989 can use fscontext and defcontext with each other, but neither can be used with
990 context.
991
992 The
993 .B fscontext=
994 option works for all filesystems, regardless of their xattr
995 support. The fscontext option sets the overarching filesystem label to a
996 specific security context. This filesystem label is separate from the
997 individual labels on the files. It represents the entire filesystem for
998 certain kinds of permission checks, such as during mount or file creation.
999 Individual file labels are still obtained from the xattrs on the files
1000 themselves. The context option actually sets the aggregate context that
1001 fscontext provides, in addition to supplying the same label for individual
1002 files.
1003
1004 You can set the default security context for unlabeled files using
1005 .B defcontext=
1006 option. This overrides the value set for unlabeled files in the policy and requires a
1007 filesystem that supports xattr labeling.
1008
1009 The
1010 .B rootcontext=
1011 option allows you to explicitly label the root inode of a FS being mounted
1012 before that FS or inode becomes visible to userspace. This was found to be
1013 useful for things like stateless linux.
1014
1015 Note that the kernel rejects any remount request that includes the context
1016 option, \fBeven\fP when unchanged from the current context.
1017
1018 .BR "Warning: the \fIcontext\fP value might contain commas" ,
1019 in which case the value has to be properly quoted, otherwise
1020 .BR mount (8)
1021 will interpret the comma as a separator between mount options. Don't forget that
1022 the shell strips off quotes and thus
1023 .BR "double quoting is required" .
1024 For example:
1025 .RS
1026 .RS
1027 .sp
1028 .nf
1029 .B mount \-t tmpfs none /mnt \-o \e
1030 .B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
1031 .fi
1032 .sp
1033 .RE
1034 For more details, see
1035 .BR selinux (8).
1036 .RE
1037
1038 .TP
1039 .B defaults
1040 Use the default options:
1041 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
1042
1043 Note that the real set of all default mount options depends on kernel
1044 and filesystem type. See the beginning of this section for more details.
1045 .TP
1046 .B dev
1047 Interpret character or block special devices on the filesystem.
1048 .TP
1049 .B nodev
1050 Do not interpret character or block special devices on the file
1051 system.
1052 .TP
1053 .B diratime
1054 Update directory inode access times on this filesystem. This is the default.
1055 (This option is ignored when \fBnoatime\fR is set.)
1056 .TP
1057 .B nodiratime
1058 Do not update directory inode access times on this filesystem.
1059 (This option is implied when \fBnoatime\fR is set.)
1060 .TP
1061 .B dirsync
1062 All directory updates within the filesystem should be done synchronously.
1063 This affects the following system calls: creat, link, unlink, symlink,
1064 mkdir, rmdir, mknod and rename.
1065 .TP
1066 .B exec
1067 Permit execution of binaries.
1068 .TP
1069 .B noexec
1070 Do not permit direct execution of any binaries on the mounted filesystem.
1071 .TP
1072 .B group
1073 Allow an ordinary user to mount the filesystem if one
1074 of that user's groups matches the group of the device.
1075 This option implies the options
1076 .BR nosuid " and " nodev
1077 (unless overridden by subsequent options, as in the option line
1078 .BR group,dev,suid ).
1079 .TP
1080 .B iversion
1081 Every time the inode is modified, the i_version field will be incremented.
1082 .TP
1083 .B noiversion
1084 Do not increment the i_version inode field.
1085 .TP
1086 .B mand
1087 Allow mandatory locks on this filesystem. See
1088 .BR fcntl (2).
1089 .TP
1090 .B nomand
1091 Do not allow mandatory locks on this filesystem.
1092 .TP
1093 .B _netdev
1094 The filesystem resides on a device that requires network access
1095 (used to prevent the system from attempting to mount these filesystems
1096 until the network has been enabled on the system).
1097 .TP
1098 .B nofail
1099 Do not report errors for this device if it does not exist.
1100 .TP
1101 .B relatime
1102 Update inode access times relative to modify or change time. Access
1103 time is only updated if the previous access time was earlier than the
1104 current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
1105 break \fBmutt\fR or other applications that need to know if a file has been
1106 read since the last time it was modified.)
1107
1108 Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1109 option (unless
1110 .B \%noatime
1111 was specified), and the
1112 .B \%strictatime
1113 option is required to obtain traditional semantics. In addition, since Linux
1114 2.6.30, the file's last access time is always updated if it is more than 1
1115 day old.
1116 .TP
1117 .B norelatime
1118 Do not use the
1119 .B relatime
1120 feature. See also the
1121 .B strictatime
1122 mount option.
1123 .TP
1124 .B strictatime
1125 Allows to explicitly request full atime updates. This makes it
1126 possible for the kernel to default to
1127 .B \%relatime
1128 or
1129 .B \%noatime
1130 but still allow userspace to override it. For more details about the default
1131 system mount options see /proc/mounts.
1132 .TP
1133 .B nostrictatime
1134 Use the kernel's default behavior for inode access time updates.
1135 .TP
1136 .B lazytime
1137 Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1138
1139 This mount option significantly reduces writes to the inode table for
1140 workloads that perform frequent random writes to preallocated files.
1141
1142 The on-disk timestamps are updated only when:
1143 .sp
1144 .RS
1145 - the inode needs to be updated for some change unrelated to file timestamps
1146 .sp
1147 - the application employs
1148 .BR fsync (2),
1149 .BR syncfs (2),
1150 or
1151 .BR sync (2)
1152 .sp
1153 - an undeleted inode is evicted from memory
1154 .sp
1155 - more than 24 hours have passed since the i-node was written to disk.
1156 .RE
1157 .sp
1158 .TP
1159 .B nolazytime
1160 Do not use the lazytime feature.
1161 .TP
1162 .B suid
1163 Honor set-user-ID and set-group-ID bits or file capabilities when
1164 executing programs from this filesystem.
1165 .TP
1166 .B nosuid
1167 Do not honor set-user-ID and set-group-ID bits or file capabilities when
1168 executing programs from this filesystem.
1169 .TP
1170 .B silent
1171 Turn on the silent flag.
1172 .TP
1173 .B loud
1174 Turn off the silent flag.
1175 .TP
1176 .B owner
1177 Allow an ordinary user to mount the filesystem if that
1178 user is the owner of the device.
1179 This option implies the options
1180 .BR nosuid " and " nodev
1181 (unless overridden by subsequent options, as in the option line
1182 .BR owner,dev,suid ).
1183 .TP
1184 .B remount
1185 Attempt to remount an already-mounted filesystem. This is commonly
1186 used to change the mount flags for a filesystem, especially to make a
1187 readonly filesystem writable. It does not change device or mount point.
1188
1189 The remount operation together with the
1190 .B bind
1191 flag has special semantic. See above, the subsection \fBBind mounts\fR.
1192
1193 The remount functionality follows the standard way the mount command works
1194 with options from fstab. This means that \fBmount\fR does not
1195 read fstab (or mtab) only when both
1196 .I device
1197 and
1198 .I dir
1199 are specified.
1200 .sp
1201 .in +4
1202 .B "mount \-o remount,rw /dev/foo /dir"
1203 .in
1204 .sp
1205 After this call all old mount options are replaced and arbitrary stuff from
1206 fstab (or mtab) is ignored, except the loop= option which is internally
1207 generated and maintained by the mount command.
1208 .sp
1209 .in +4
1210 .B "mount \-o remount,rw /dir"
1211 .in
1212 .sp
1213 After this call, mount reads fstab and merges these options with
1214 the options from the command line (\fB\-o\fR).
1215 If no mountpoint is found in fstab, then a remount with unspecified source is
1216 allowed.
1217 .TP
1218 .B ro
1219 Mount the filesystem read-only.
1220 .TP
1221 .B rw
1222 Mount the filesystem read-write.
1223 .TP
1224 .B sync
1225 All I/O to the filesystem should be done synchronously. In the case of
1226 media with a limited number of write cycles
1227 (e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
1228 .TP
1229 .B user
1230 Allow an ordinary user to mount the filesystem.
1231 The name of the mounting user is written to the mtab file (or to the private
1232 libmount file in /run/mount on systems without a regular mtab) so that this
1233 same user can unmount the filesystem again.
1234 This option implies the options
1235 .BR noexec ", " nosuid ", and " nodev
1236 (unless overridden by subsequent options, as in the option line
1237 .BR user,exec,dev,suid ).
1238 .TP
1239 .B nouser
1240 Forbid an ordinary user to mount the filesystem.
1241 This is the default; it does not imply any other options.
1242 .TP
1243 .B users
1244 Allow any user to mount and to unmount the filesystem, even
1245 when some other ordinary user mounted it.
1246 This option implies the options
1247 .BR noexec ", " nosuid ", and " nodev
1248 (unless overridden by subsequent options, as in the option line
1249 .BR users,exec,dev,suid ).
1250 .TP
1251 .B X-*
1252 All options prefixed with "X-" are interpreted as comments or as userspace
1253 application-specific options. These options are not stored in the user space (e.g. mtab file),
1254 nor sent to the mount.\fItype\fR helpers nor to the
1255 .BR mount (2)
1256 system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
1257 .TP
1258 .B x-*
1259 The same as \fBX-*\fR options, but stored permanently in the user space. It
1260 means the options are also available for umount or another operations. Note
1261 that maintain mount options in user space is tricky, because it's necessary use
1262 libmount based tools and there is no guarantee that the options will be always
1263 available (for example after a move mount operation or in unshared namespace).
1264
1265 Note that before util-linux v2.30 the x-* options have not been maintained by
1266 libmount and stored in user space (functionality was the same as have X-* now),
1267 but due to growing number of use-cases (in initrd, systemd etc.) the
1268 functionality have been extended to keep existing fstab configurations usable
1269 without a change.
1270 .TP
1271 .BR X-mount.mkdir [ = \fImode\fR ]
1272 Allow to make a target directory (mountpoint). The optional argument
1273 .I mode
1274 specifies the filesystem access mode used for
1275 .BR mkdir (2)
1276 in octal notation. The default mode is 0755. This functionality is supported
1277 only for root users. The option is also supported as x-mount.mkdir, this notation
1278 is deprecated for mount.mkdir since v2.30.
1279
1280 .SH "FILESYSTEM-SPECIFIC MOUNT OPTIONS"
1281 You should consult the respective man page for the filesystem first.
1282 If you want to know what options the ext4 filesystem supports, then check the
1283 .BR ext4 (5)
1284 man page.
1285 If that doesn't exist, you can also check the corresponding mount page like
1286 .BR mount.cifs (8).
1287 Note that you might have to install the respective userland tools.
1288 .sp
1289 The following options apply only to certain filesystems.
1290 We sort them by filesystem. They all follow the
1291 .B \-o
1292 flag.
1293 .sp
1294 What options are supported depends a bit on the running kernel.
1295 More info may be found in the kernel source subdirectory
1296 .IR Documentation/filesystems .
1297
1298 .SS "Mount options for adfs"
1299 .TP
1300 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1301 Set the owner and group of the files in the filesystem (default: uid=gid=0).
1302 .TP
1303 \fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
1304 Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1305 respectively (default: 0700 and 0077, respectively).
1306 See also
1307 .IR /usr/src/linux/Documentation/filesystems/adfs.txt .
1308
1309 .SS "Mount options for affs"
1310 .TP
1311 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1312 Set the owner and group of the root of the filesystem (default: uid=gid=0,
1313 but with option
1314 .B uid
1315 or
1316 .B gid
1317 without specified value, the UID and GID of the current process are taken).
1318 .TP
1319 \fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
1320 Set the owner and group of all files.
1321 .TP
1322 .BI mode= value
1323 Set the mode of all files to
1324 .IR value " & 0777"
1325 disregarding the original permissions.
1326 Add search permission to directories that have read permission.
1327 The value is given in octal.
1328 .TP
1329 .B protect
1330 Do not allow any changes to the protection bits on the filesystem.
1331 .TP
1332 .B usemp
1333 Set UID and GID of the root of the filesystem to the UID and GID
1334 of the mount point upon the first sync or umount, and then
1335 clear this option. Strange...
1336 .TP
1337 .B verbose
1338 Print an informational message for each successful mount.
1339 .TP
1340 .BI prefix= string
1341 Prefix used before volume name, when following a link.
1342 .TP
1343 .BI volume= string
1344 Prefix (of length at most 30) used before '/' when following a symbolic link.
1345 .TP
1346 .BI reserved= value
1347 (Default: 2.) Number of unused blocks at the start of the device.
1348 .TP
1349 .BI root= value
1350 Give explicitly the location of the root block.
1351 .TP
1352 .BI bs= value
1353 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1354 .TP
1355 .BR grpquota | noquota | quota | usrquota
1356 These options are accepted but ignored.
1357 (However, quota utilities may react to such strings in
1358 .IR /etc/fstab .)
1359
1360 .SS "Mount options for debugfs"
1361 The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1362 .IR /sys/kernel/debug .
1363 .\" or just /debug
1364 .\" present since 2.6.11
1365 As of kernel version 3.4, debugfs has the following options:
1366 .TP
1367 .BI uid= n ", gid=" n
1368 Set the owner and group of the mountpoint.
1369 .TP
1370 .BI mode= value
1371 Sets the mode of the mountpoint.
1372
1373 .SS "Mount options for devpts"
1374 The devpts filesystem is a pseudo filesystem, traditionally mounted on
1375 .IR /dev/pts .
1376 In order to acquire a pseudo terminal, a process opens
1377 .IR /dev/ptmx ;
1378 the number of the pseudo terminal is then made available to the process
1379 and the pseudo terminal slave can be accessed as
1380 .IR /dev/pts/ <number>.
1381 .TP
1382 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1383 This sets the owner or the group of newly created PTYs to
1384 the specified values. When nothing is specified, they will
1385 be set to the UID and GID of the creating process.
1386 For example, if there is a tty group with GID 5, then
1387 .B gid=5
1388 will cause newly created PTYs to belong to the tty group.
1389 .TP
1390 .BI mode= value
1391 Set the mode of newly created PTYs to the specified value.
1392 The default is 0600.
1393 A value of
1394 .B mode=620
1395 and
1396 .B gid=5
1397 makes "mesg y" the default on newly created PTYs.
1398 .TP
1399 \fBnewinstance
1400 Create a private instance of devpts filesystem, such that
1401 indices of ptys allocated in this new instance are
1402 independent of indices created in other instances of devpts.
1403
1404 All mounts of devpts without this
1405 .B newinstance
1406 option share the same set of pty indices (i.e. legacy mode).
1407 Each mount of devpts with the
1408 .B newinstance
1409 option has a private set of pty indices.
1410
1411 This option is mainly used to support containers in the
1412 linux kernel. It is implemented in linux kernel versions
1413 starting with 2.6.29. Further, this mount option is valid
1414 only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1415 kernel configuration.
1416
1417 To use this option effectively,
1418 .I /dev/ptmx
1419 must be a symbolic link to
1420 .I pts/ptmx.
1421 See
1422 .I Documentation/filesystems/devpts.txt
1423 in the linux kernel source tree for details.
1424 .TP
1425 .BI ptmxmode= value
1426
1427 Set the mode for the new
1428 .I ptmx
1429 device node in the devpts filesystem.
1430
1431 With the support for multiple instances of devpts (see
1432 .B newinstance
1433 option above), each instance has a private
1434 .I ptmx
1435 node in the root of the devpts filesystem (typically
1436 .IR /dev/pts/ptmx ).
1437
1438 For compatibility with older versions of the kernel, the
1439 default mode of the new
1440 .I ptmx
1441 node is 0000.
1442 .BI ptmxmode= value
1443 specifies a more useful mode for the
1444 .I ptmx
1445 node and is highly recommended when the
1446 .B newinstance
1447 option is specified.
1448
1449 This option is only implemented in linux kernel versions
1450 starting with 2.6.29. Further, this option is valid only if
1451 CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1452 configuration.
1453
1454 .SS "Mount options for fat"
1455 (Note:
1456 .I fat
1457 is not a separate filesystem, but a common part of the
1458 .IR msdos ,
1459 .I umsdos
1460 and
1461 .I vfat
1462 filesystems.)
1463 .TP
1464 .BR blocksize= { 512 | 1024 | 2048 }
1465 Set blocksize (default 512). This option is obsolete.
1466 .TP
1467 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1468 Set the owner and group of all files.
1469 (Default: the UID and GID of the current process.)
1470 .TP
1471 .BI umask= value
1472 Set the umask (the bitmask of the permissions that are
1473 .B not
1474 present). The default is the umask of the current process.
1475 The value is given in octal.
1476 .TP
1477 .BI dmask= value
1478 Set the umask applied to directories only.
1479 The default is the umask of the current process.
1480 The value is given in octal.
1481 .TP
1482 .BI fmask= value
1483 Set the umask applied to regular files only.
1484 The default is the umask of the current process.
1485 The value is given in octal.
1486 .TP
1487 .BI allow_utime= value
1488 This option controls the permission check of mtime/atime.
1489 .RS
1490 .TP
1491 .B 20
1492 If current process is in group of file's group ID, you can change timestamp.
1493 .TP
1494 .B 2
1495 Other users can change timestamp.
1496 .PP
1497 The default is set from `dmask' option. (If the directory is writable,
1498 .BR utime (2)
1499 is also allowed. I.e.\& \s+3~\s0dmask & 022)
1500
1501 Normally
1502 .BR utime (2)
1503 checks current process is owner of the file, or it has
1504 CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
1505 normal check is too inflexible. With this option you can relax it.
1506 .RE
1507 .TP
1508 .BI check= value
1509 Three different levels of pickiness can be chosen:
1510 .RS
1511 .TP
1512 .BR r [ elaxed ]
1513 Upper and lower case are accepted and equivalent, long name parts are
1514 truncated (e.g.\&
1515 .I verylongname.foobar
1516 becomes
1517 .IR verylong.foo ),
1518 leading and embedded spaces are accepted in each name part (name and extension).
1519 .TP
1520 .BR n [ ormal ]
1521 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1522 rejected. This is the default.
1523 .TP
1524 .BR s [ trict ]
1525 Like "normal", but names that contain long parts or special characters
1526 that are sometimes used on Linux but are not accepted by MS-DOS
1527 (+, =, etc.) are rejected.
1528 .RE
1529 .TP
1530 .BI codepage= value
1531 Sets the codepage for converting to shortname characters on FAT
1532 and VFAT filesystems. By default, codepage 437 is used.
1533 .TP
1534 .BI conv= mode
1535 This option is obsolete and may fail or being ignored.
1536 .TP
1537 .BI cvf_format= module
1538 Forces the driver to use the CVF (Compressed Volume File) module
1539 .RI cvf_ module
1540 instead of auto-detection. If the kernel supports kmod, the
1541 cvf_format=xxx option also controls on-demand CVF module loading.
1542 This option is obsolete.
1543 .TP
1544 .BI cvf_option= option
1545 Option passed to the CVF module. This option is obsolete.
1546 .TP
1547 .B debug
1548 Turn on the
1549 .I debug
1550 flag. A version string and a list of filesystem parameters will be
1551 printed (these data are also printed if the parameters appear to be
1552 inconsistent).
1553 .TP
1554 .B discard
1555 If set, causes discard/TRIM commands to be issued to the block device
1556 when blocks are freed. This is useful for SSD devices and
1557 sparse/thinly-provisioned LUNs.
1558 .TP
1559 .B dos1xfloppy
1560 If set, use a fallback default BIOS Parameter Block configuration, determined
1561 by backing device size. These static parameters match defaults assumed by DOS
1562 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1563 .TP
1564 .BR errors= { panic | continue | remount-ro }
1565 Specify FAT behavior on critical errors: panic, continue without doing
1566 anything, or remount the partition in read-only mode (default behavior).
1567 .TP
1568 .BR fat= { 12 | 16 | 32 }
1569 Specify a 12, 16 or 32 bit fat. This overrides
1570 the automatic FAT type detection routine. Use with caution!
1571 .TP
1572 .BI iocharset= value
1573 Character set to use for converting between 8 bit characters
1574 and 16 bit Unicode characters. The default is iso8859-1.
1575 Long filenames are stored on disk in Unicode format.
1576 .TP
1577 .BR nfs= { stale_rw | nostale_ro }
1578 Enable this only if you want to export the FAT filesystem over NFS.
1579
1580 .BR stale_rw :
1581 This option maintains an index (cache) of directory inodes which is used by the
1582 nfs-related code to improve look-ups. Full file operations (read/write) over
1583 NFS are supported but with cache eviction at NFS server, this could result in
1584 spurious
1585 .B ESTALE
1586 errors.
1587
1588 .BR nostale_ro :
1589 This option bases the inode number and file handle
1590 on the on-disk location of a file in the FAT directory entry.
1591 This ensures that
1592 .B ESTALE
1593 will not be returned after a file is
1594 evicted from the inode cache. However, it means that operations
1595 such as rename, create and unlink could cause file handles that
1596 previously pointed at one file to point at a different file,
1597 potentially causing data corruption. For this reason, this
1598 option also mounts the filesystem readonly.
1599
1600 To maintain backward compatibility, '-o nfs' is also accepted,
1601 defaulting to
1602 .BR stale_rw .
1603 .TP
1604 .B tz=UTC
1605 This option disables the conversion of timestamps
1606 between local time (as used by Windows on FAT) and UTC
1607 (which Linux uses internally). This is particularly
1608 useful when mounting devices (like digital cameras)
1609 that are set to UTC in order to avoid the pitfalls of
1610 local time.
1611 .TP
1612 .BI time_offset= minutes
1613 Set offset for conversion of timestamps from local time used by FAT to UTC.
1614 I.e.,
1615 .I minutes
1616 will be subtracted from each timestamp to convert it to UTC used
1617 internally by Linux. This is useful when the time zone set in the kernel via
1618 .BR settimeofday (2)
1619 is not the time zone used by the filesystem. Note
1620 that this option still does not provide correct time stamps in all cases in
1621 presence of DST - time stamps in a different DST setting will be off by one
1622 hour.
1623 .TP
1624 .B quiet
1625 Turn on the
1626 .I quiet
1627 flag. Attempts to chown or chmod files do not return errors,
1628 although they fail. Use with caution!
1629 .TP
1630 .B rodir
1631 FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
1632 directory will just be ignored, and is used only by applications as a flag
1633 (e.g.\& it's set for the customized folder).
1634
1635 If you want to use ATTR_RO as read-only flag even for the directory, set this
1636 option.
1637 .TP
1638 .B showexec
1639 If set, the execute permission bits of the file will be allowed only if
1640 the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
1641 .TP
1642 .B sys_immutable
1643 If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1644 Not set by default.
1645 .TP
1646 .B flush
1647 If set, the filesystem will try to flush to disk more early than normal.
1648 Not set by default.
1649 .TP
1650 .B usefree
1651 Use the "free clusters" value stored on FSINFO. It'll
1652 be used to determine number of free clusters without
1653 scanning disk. But it's not used by default, because
1654 recent Windows don't update it correctly in some
1655 case. If you are sure the "free clusters" on FSINFO is
1656 correct, by this option you can avoid scanning disk.
1657 .TP
1658 .BR dots ", " nodots ", " dotsOK= [ yes | no ]
1659 Various misguided attempts to force Unix or DOS conventions
1660 onto a FAT filesystem.
1661
1662 .SS "Mount options for hfs"
1663 .TP
1664 .BI creator= cccc ", type=" cccc
1665 Set the creator/type values as shown by the MacOS finder
1666 used for creating new files. Default values: '????'.
1667 .TP
1668 .BI uid= n ", gid=" n
1669 Set the owner and group of all files.
1670 (Default: the UID and GID of the current process.)
1671 .TP
1672 .BI dir_umask= n ", file_umask=" n ", umask=" n
1673 Set the umask used for all directories, all regular files, or all
1674 files and directories. Defaults to the umask of the current process.
1675 .TP
1676 .BI session= n
1677 Select the CDROM session to mount.
1678 Defaults to leaving that decision to the CDROM driver.
1679 This option will fail with anything but a CDROM as underlying device.
1680 .TP
1681 .BI part= n
1682 Select partition number n from the device.
1683 Only makes sense for CDROMs.
1684 Defaults to not parsing the partition table at all.
1685 .TP
1686 .B quiet
1687 Don't complain about invalid mount options.
1688
1689 .SS "Mount options for hpfs"
1690 .TP
1691 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1692 Set the owner and group of all files. (Default: the UID and GID
1693 of the current process.)
1694 .TP
1695 .BI umask= value
1696 Set the umask (the bitmask of the permissions that are
1697 .B not
1698 present). The default is the umask of the current process.
1699 The value is given in octal.
1700 .TP
1701 .BR case= { lower | asis }
1702 Convert all files names to lower case, or leave them.
1703 (Default:
1704 .BR case=lower .)
1705 .TP
1706 .BI conv= mode
1707 This option is obsolete and may fail or being ignored.
1708 .TP
1709 .B nocheck
1710 Do not abort mounting when certain consistency checks fail.
1711
1712 .SS "Mount options for iso9660"
1713 ISO 9660 is a standard describing a filesystem structure to be used
1714 on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1715 .I udf
1716 filesystem.)
1717
1718 Normal
1719 .I iso9660
1720 filenames appear in an 8.3 format (i.e., DOS-like restrictions on filename
1721 length), and in addition all characters are in upper case. Also there is
1722 no field for file ownership, protection, number of links, provision for
1723 block/character devices, etc.
1724
1725 Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1726 features. Basically there are extensions to each directory record that
1727 supply all of the additional information, and when Rock Ridge is in use,
1728 the filesystem is indistinguishable from a normal UNIX filesystem (except
1729 that it is read-only, of course).
1730 .TP
1731 .B norock
1732 Disable the use of Rock Ridge extensions, even if available. Cf.\&
1733 .BR map .
1734 .TP
1735 .B nojoliet
1736 Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1737 .BR map .
1738 .TP
1739 .BR check= { r [ elaxed ]| s [ trict ]}
1740 With
1741 .BR check=relaxed ,
1742 a filename is first converted to lower case before doing the lookup.
1743 This is probably only meaningful together with
1744 .B norock
1745 and
1746 .BR map=normal .
1747 (Default:
1748 .BR check=strict .)
1749 .TP
1750 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1751 Give all files in the filesystem the indicated user or group id,
1752 possibly overriding the information found in the Rock Ridge extensions.
1753 (Default:
1754 .BR uid=0,gid=0 .)
1755 .TP
1756 .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1757 For non-Rock Ridge volumes, normal name translation maps upper
1758 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1759 With
1760 .B map=off
1761 no name translation is done. See
1762 .BR norock .
1763 (Default:
1764 .BR map=normal .)
1765 .B map=acorn
1766 is like
1767 .B map=normal
1768 but also apply Acorn extensions if present.
1769 .TP
1770 .BI mode= value
1771 For non-Rock Ridge volumes, give all files the indicated mode.
1772 (Default: read and execute permission for everybody.)
1773 Octal mode values require a leading 0.
1774 .TP
1775 .B unhide
1776 Also show hidden and associated files.
1777 (If the ordinary files and the associated or hidden files have
1778 the same filenames, this may make the ordinary files inaccessible.)
1779 .TP
1780 .BR block= { 512 | 1024 | 2048 }
1781 Set the block size to the indicated value.
1782 (Default:
1783 .BR block=1024 .)
1784 .TP
1785 .BI conv= mode
1786 This option is obsolete and may fail or being ignored.
1787 .TP
1788 .B cruft
1789 If the high byte of the file length contains other garbage,
1790 set this mount option to ignore the high order bits of the file length.
1791 This implies that a file cannot be larger than 16\ MB.
1792 .TP
1793 .BI session= x
1794 Select number of session on multisession CD.
1795 .TP
1796 .BI sbsector= xxx
1797 Session begins from sector xxx.
1798 .LP
1799 The following options are the same as for vfat and specifying them only makes
1800 sense when using discs encoded using Microsoft's Joliet extensions.
1801 .TP
1802 .BI iocharset= value
1803 Character set to use for converting 16 bit Unicode characters on CD
1804 to 8 bit characters. The default is iso8859-1.
1805 .TP
1806 .B utf8
1807 Convert 16 bit Unicode characters on CD to UTF-8.
1808
1809 .SS "Mount options for jfs"
1810 .TP
1811 .BI iocharset= name
1812 Character set to use for converting from Unicode to ASCII. The default is
1813 to do no conversion. Use
1814 .B iocharset=utf8
1815 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1816 the kernel
1817 .I ".config"
1818 file.
1819 .TP
1820 .BI resize= value
1821 Resize the volume to
1822 .I value
1823 blocks. JFS only supports growing a volume, not shrinking it. This option
1824 is only valid during a remount, when the volume is mounted read-write. The
1825 .B resize
1826 keyword with no value will grow the volume to the full size of the partition.
1827 .TP
1828 .B nointegrity
1829 Do not write to the journal. The primary use of this option is to allow
1830 for higher performance when restoring a volume from backup media. The
1831 integrity of the volume is not guaranteed if the system abnormally ends.
1832 .TP
1833 .B integrity
1834 Default. Commit metadata changes to the journal. Use this option to remount
1835 a volume where the
1836 .B nointegrity
1837 option was previously specified in order to restore normal behavior.
1838 .TP
1839 .BR errors= { continue | remount-ro | panic }
1840 Define the behavior when an error is encountered.
1841 (Either ignore errors and just mark the filesystem erroneous and continue,
1842 or remount the filesystem read-only, or panic and halt the system.)
1843 .TP
1844 .BR noquota | quota | usrquota | grpquota
1845 These options are accepted but ignored.
1846
1847 .SS "Mount options for msdos"
1848 See mount options for fat.
1849 If the
1850 .I msdos
1851 filesystem detects an inconsistency, it reports an error and sets the file
1852 system read-only. The filesystem can be made writable again by remounting
1853 it.
1854
1855 .SS "Mount options for ncpfs"
1856 Just like
1857 .IR nfs ", the " ncpfs
1858 implementation expects a binary argument (a
1859 .IR "struct ncp_mount_data" )
1860 to the mount system call. This argument is constructed by
1861 .BR ncpmount (8)
1862 and the current version of
1863 .B mount
1864 (2.12) does not know anything about ncpfs.
1865
1866 .SS "Mount options for ntfs"
1867 .TP
1868 .BI iocharset= name
1869 Character set to use when returning file names.
1870 Unlike VFAT, NTFS suppresses names that contain
1871 nonconvertible characters. Deprecated.
1872 .TP
1873 .BI nls= name
1874 New name for the option earlier called
1875 .IR iocharset .
1876 .TP
1877 .B utf8
1878 Use UTF-8 for converting file names.
1879 .TP
1880 .BR uni_xlate= { 0 | 1 | 2 }
1881 For 0 (or `no' or `false'), do not use escape sequences
1882 for unknown Unicode characters.
1883 For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1884 starting with ":". Here 2 give a little-endian encoding
1885 and 1 a byteswapped bigendian encoding.
1886 .TP
1887 .B posix=[0|1]
1888 If enabled (posix=1), the filesystem distinguishes between
1889 upper and lower case. The 8.3 alias names are presented as
1890 hard links instead of being suppressed. This option is obsolete.
1891 .TP
1892 \fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
1893 Set the file permission on the filesystem.
1894 The umask value is given in octal.
1895 By default, the files are owned by root and not readable by somebody else.
1896
1897 .SS "Mount options for overlay"
1898 Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
1899 other filesystems.
1900
1901 An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
1902 a \fBlower\fR filesystem. When a name exists in both filesystems, the object
1903 in the upper filesystem is visible while the object in the lower filesystem is
1904 either hidden or, in the case of directories, merged with the upper object.
1905
1906 The lower filesystem can be any filesystem supported by Linux and does not need
1907 to be writable. The lower filesystem can even be another overlayfs. The upper
1908 filesystem will normally be writable and if it is it must support the creation
1909 of trusted.* extended attributes, and must provide a valid d_type in readdir
1910 responses, so NFS is not suitable.
1911
1912 A read-only overlay of two read-only filesystems may use any filesystem type.
1913 The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
1914 directory by using:
1915
1916 .RS
1917 .br
1918 .nf
1919 .B "mount \-t overlay overlay \e"
1920 .B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
1921 .fi
1922 .br
1923 .RE
1924
1925 .TP
1926 .BI lowerdir= directory
1927 Any filesystem, does not need to be on a writable filesystem.
1928 .TP
1929 .BI upperdir= directory
1930 The upperdir is normally on a writable filesystem.
1931 .TP
1932 .BI workdir= directory
1933 The workdir needs to be an empty directory on the same filesystem as upperdir.
1934
1935 .SS "Mount options for reiserfs"
1936 Reiserfs is a journaling filesystem.
1937 .TP
1938 .B conv
1939 Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
1940 using the 3.6 format for newly created objects. This filesystem will no
1941 longer be compatible with reiserfs 3.5 tools.
1942 .TP
1943 .BR hash= { rupasov | tea | r5 | detect }
1944 Choose which hash function reiserfs will use to find files within directories.
1945 .RS
1946 .TP
1947 .B rupasov
1948 A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
1949 mapping lexicographically close file names to close hash values.
1950 This option should not be used, as it causes a high probability of hash
1951 collisions.
1952 .TP
1953 .B tea
1954 A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1955 It uses hash permuting bits in the name. It gets high randomness
1956 and, therefore, low probability of hash collisions at some CPU cost.
1957 This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1958 .TP
1959 .B r5
1960 A modified version of the rupasov hash. It is used by default and is
1961 the best choice unless the filesystem has huge directories and
1962 unusual file-name patterns.
1963 .TP
1964 .B detect
1965 Instructs
1966 .I mount
1967 to detect which hash function is in use by examining
1968 the filesystem being mounted, and to write this information into
1969 the reiserfs superblock. This is only useful on the first mount of
1970 an old format filesystem.
1971 .RE
1972 .TP
1973 .B hashed_relocation
1974 Tunes the block allocator. This may provide performance improvements
1975 in some situations.
1976 .TP
1977 .B no_unhashed_relocation
1978 Tunes the block allocator. This may provide performance improvements
1979 in some situations.
1980 .TP
1981 .B noborder
1982 Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
1983 This may provide performance improvements in some situations.
1984 .TP
1985 .B nolog
1986 Disable journaling. This will provide slight performance improvements in
1987 some situations at the cost of losing reiserfs's fast recovery from crashes.
1988 Even with this option turned on, reiserfs still performs all journaling
1989 operations, save for actual writes into its journaling area. Implementation
1990 of
1991 .I nolog
1992 is a work in progress.
1993 .TP
1994 .B notail
1995 By default, reiserfs stores small files and `file tails' directly into its
1996 tree. This confuses some utilities such as
1997 .BR LILO (8).
1998 This option is used to disable packing of files into the tree.
1999 .TP
2000 .B replayonly
2001 Replay the transactions which are in the journal, but do not actually
2002 mount the filesystem. Mainly used by
2003 .IR reiserfsck .
2004 .TP
2005 .BI resize= number
2006 A remount option which permits online expansion of reiserfs partitions.
2007 Instructs reiserfs to assume that the device has
2008 .I number
2009 blocks.
2010 This option is designed for use with devices which are under logical
2011 volume management (LVM).
2012 There is a special
2013 .I resizer
2014 utility which can be obtained from
2015 .IR ftp://ftp.namesys.com/pub/reiserfsprogs .
2016 .TP
2017 .B user_xattr
2018 Enable Extended User Attributes. See the
2019 .BR attr (5)
2020 manual page.
2021 .TP
2022 .B acl
2023 Enable POSIX Access Control Lists. See the
2024 .BR acl (5)
2025 manual page.
2026 .TP
2027 .BR barrier=none " / " barrier=flush "
2028 This disables / enables the use of write barriers in the journaling code.
2029 barrier=none disables, barrier=flush enables (default). This also requires an
2030 IO stack which can support barriers, and if reiserfs gets an error on a barrier
2031 write, it will disable barriers again with a warning. Write barriers enforce
2032 proper on-disk ordering of journal commits, making volatile disk write caches
2033 safe to use, at some performance penalty. If your disks are battery-backed in
2034 one way or another, disabling barriers may safely improve performance.
2035
2036 .SS "Mount options for ubifs"
2037 UBIFS is a flash filesystem which works on top of UBI volumes. Note that
2038 \fBatime\fR is not supported and is always turned off.
2039 .TP
2040 The device name may be specified as
2041 .RS
2042 .B ubiX_Y
2043 UBI device number
2044 .BR X ,
2045 volume number
2046 .B Y
2047 .TP
2048 .B ubiY
2049 UBI device number
2050 .BR 0 ,
2051 volume number
2052 .B Y
2053 .TP
2054 .B ubiX:NAME
2055 UBI device number
2056 .BR X ,
2057 volume with name
2058 .B NAME
2059 .TP
2060 .B ubi:NAME
2061 UBI device number
2062 .BR 0 ,
2063 volume with name
2064 .B NAME
2065 .RE
2066 Alternative
2067 .B !
2068 separator may be used instead of
2069 .BR : .
2070 .TP
2071 The following mount options are available:
2072 .TP
2073 .B bulk_read
2074 Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2075 system. Bulk-Read is an internal optimization. Some flashes may read faster if
2076 the data are read at one go, rather than at several read requests. For
2077 example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2078 .TP
2079 .B no_bulk_read
2080 Do not bulk-read. This is the default.
2081 .TP
2082 .B chk_data_crc
2083 Check data CRC-32 checksums. This is the default.
2084 .TP
2085 .BR no_chk_data_crc .
2086 Do not check data CRC-32 checksums. With this option, the filesystem does not
2087 check CRC-32 checksum for data, but it does check it for the internal indexing
2088 information. This option only affects reading, not writing. CRC-32 is always
2089 calculated when writing the data.
2090 .TP
2091 .BR compr= { none | lzo | zlib }
2092 Select the default compressor which is used when new files are written. It is
2093 still possible to read compressed files if mounted with the
2094 .B none
2095 option.
2096
2097 .SS "Mount options for udf"
2098 UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
2099 Storage Technology Association, and is often used for DVD-ROM, frequently
2100 in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
2101 perfectly usable by itself on disk drives, flash drives and other block devices.
2102 See also
2103 .IR iso9660 .
2104 .TP
2105 .B uid=
2106 Make all files in the filesystem belong to the given user.
2107 uid=forget can be specified independently of (or usually in
2108 addition to) uid=<user> and results in UDF
2109 not storing uids to the media. In fact the recorded uid
2110 is the 32-bit overflow uid -1 as defined by the UDF standard.
2111 The value is given as either <user> which is a valid user name or the corresponding
2112 decimal user id, or the special string "forget".
2113 .TP
2114 .B gid=
2115 Make all files in the filesystem belong to the given group.
2116 gid=forget can be specified independently of (or usually in
2117 addition to) gid=<group> and results in UDF
2118 not storing gids to the media. In fact the recorded gid
2119 is the 32-bit overflow gid -1 as defined by the UDF standard.
2120 The value is given as either <group> which is a valid group name or the corresponding
2121 decimal group id, or the special string "forget".
2122 .TP
2123 .B umask=
2124 Mask out the given permissions from all inodes read from the filesystem.
2125 The value is given in octal.
2126 .TP
2127 .B mode=
2128 If mode= is set the permissions of all non-directory inodes read from the
2129 filesystem will be set to the given mode. The value is given in octal.
2130 .TP
2131 .B dmode=
2132 If dmode= is set the permissions of all directory inodes read from the
2133 filesystem will be set to the given dmode. The value is given in octal.
2134 .TP
2135 .B bs=
2136 Set the block size. Default value prior to kernel version 2.6.30 was
2137 2048. Since 2.6.30 and prior to 4.11 it was logical device block size with
2138 fallback to 2048. Since 4.11 it is logical block size with fallback to
2139 any valid block size between logical device block size and 4096.
2140
2141 For other details see the \fBmkudffs\fP(8) 2.0+ manpage, sections
2142 \fBCOMPATIBILITY\fP and \fBBLOCK SIZE\fP.
2143 .TP
2144 .B unhide
2145 Show otherwise hidden files.
2146 .TP
2147 .B undelete
2148 Show deleted files in lists.
2149 .TP
2150 .B adinicb
2151 Embed data in the inode. (default)
2152 .TP
2153 .B noadinicb
2154 Don't embed data in the inode.
2155 .TP
2156 .B shortad
2157 Use short UDF address descriptors.
2158 .TP
2159 .B longad
2160 Use long UDF address descriptors. (default)
2161 .TP
2162 .B nostrict
2163 Unset strict conformance.
2164 .TP
2165 .B iocharset=
2166 Set the NLS character set. This requires kernel compiled with CONFIG_UDF_NLS option.
2167 .TP
2168 .B utf8
2169 Set the UTF-8 character set.
2170 .SS Mount options for debugging and disaster recovery
2171 .TP
2172 .B novrs
2173 Ignore the Volume Recognition Sequence and attempt to mount anyway.
2174 .TP
2175 .B session=
2176 Select the session number for multi-session recorded optical media. (default= last session)
2177 .TP
2178 .B anchor=
2179 Override standard anchor location. (default= 256)
2180 .TP
2181 .B lastblock=
2182 Set the last block of the filesystem.
2183 .SS Unused historical mount options that may be encountered and should be removed
2184 .TP
2185 .B uid=ignore
2186 Ignored, use uid=<user> instead.
2187 .TP
2188 .B gid=ignore
2189 Ignored, use gid=<group> instead.
2190 .TP
2191 .B volume=
2192 Unimplemented and ignored.
2193 .TP
2194 .B partition=
2195 Unimplemented and ignored.
2196 .TP
2197 .B fileset=
2198 Unimplemented and ignored.
2199 .TP
2200 .B rootdir=
2201 Unimplemented and ignored.
2202
2203 .SS "Mount options for ufs"
2204 .TP
2205 .BI ufstype= value
2206 UFS is a filesystem widely used in different operating systems.
2207 The problem are differences among implementations. Features of some
2208 implementations are undocumented, so its hard to recognize the
2209 type of ufs automatically.
2210 That's why the user must specify the type of ufs by mount option.
2211 Possible values are:
2212 .RS
2213 .TP
2214 .B old
2215 Old format of ufs, this is the default, read only.
2216 (Don't forget to give the \-r option.)
2217 .TP
2218 .B 44bsd
2219 For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
2220 .TP
2221 .B ufs2
2222 Used in FreeBSD 5.x supported as read-write.
2223 .TP
2224 .B 5xbsd
2225 Synonym for ufs2.
2226 .TP
2227 .B sun
2228 For filesystems created by SunOS or Solaris on Sparc.
2229 .TP
2230 .B sunx86
2231 For filesystems created by Solaris on x86.
2232 .TP
2233 .B hp
2234 For filesystems created by HP-UX, read-only.
2235 .TP
2236 .B nextstep
2237 For filesystems created by NeXTStep (on NeXT station) (currently read only).
2238 .TP
2239 .B nextstep-cd
2240 For NextStep CDROMs (block_size == 2048), read-only.
2241 .TP
2242 .B openstep
2243 For filesystems created by OpenStep (currently read only).
2244 The same filesystem type is also used by Mac OS X.
2245 .RE
2246
2247 .TP
2248 .BI onerror= value
2249 Set behavior on error:
2250 .RS
2251 .TP
2252 .B panic
2253 If an error is encountered, cause a kernel panic.
2254 .TP
2255 .RB [ lock | umount | repair ]
2256 These mount options don't do anything at present;
2257 when an error is encountered only a console message is printed.
2258 .RE
2259
2260 .SS "Mount options for umsdos"
2261 See mount options for msdos.
2262 The
2263 .B dotsOK
2264 option is explicitly killed by
2265 .IR umsdos .
2266
2267 .SS "Mount options for vfat"
2268 First of all, the mount options for
2269 .I fat
2270 are recognized.
2271 The
2272 .B dotsOK
2273 option is explicitly killed by
2274 .IR vfat .
2275 Furthermore, there are
2276 .TP
2277 .B uni_xlate
2278 Translate unhandled Unicode characters to special escaped sequences.
2279 This lets you backup and restore filenames that are created with any
2280 Unicode characters. Without this option, a '?' is used when no
2281 translation is possible. The escape character is ':' because it is
2282 otherwise invalid on the vfat filesystem. The escape sequence
2283 that gets used, where u is the Unicode character,
2284 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2285 .TP
2286 .B posix
2287 Allow two files with names that only differ in case.
2288 This option is obsolete.
2289 .TP
2290 .B nonumtail
2291 First try to make a short name without sequence number,
2292 before trying
2293 .IR name\s+3~\s0num.ext .
2294 .TP
2295 .B utf8
2296 UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2297 console. It can be enabled for the filesystem with this option or disabled
2298 with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2299 disabled.
2300 .TP
2301 .BI shortname= mode
2302 Defines the behavior for creation and display of filenames which fit into
2303 8.3 characters. If a long name for a file exists, it will always be the
2304 preferred one for display. There are four \fImode\fRs:
2305 .RS
2306 .TP
2307 .B lower
2308 Force the short name to lower case upon display; store a long name when
2309 the short name is not all upper case.
2310 .TP
2311 .B win95
2312 Force the short name to upper case upon display; store a long name when
2313 the short name is not all upper case.
2314 .TP
2315 .B winnt
2316 Display the short name as is; store a long name when the short name is
2317 not all lower case or all upper case.
2318 .TP
2319 .B mixed
2320 Display the short name as is; store a long name when the short name is not
2321 all upper case. This mode is the default since Linux 2.6.32.
2322 .RE
2323
2324 .SS "Mount options for usbfs"
2325 .TP
2326 \fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
2327 Set the owner and group and mode of the device files in the usbfs filesystem
2328 (default: uid=gid=0, mode=0644). The mode is given in octal.
2329 .TP
2330 \fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
2331 Set the owner and group and mode of the bus directories in the usbfs
2332 filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2333 .TP
2334 \fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
2335 Set the owner and group and mode of the file
2336 .I devices
2337 (default: uid=gid=0, mode=0444). The mode is given in octal.
2338
2339 .SH "THE LOOP DEVICE"
2340 One further possible type is a mount via the loop device. For example,
2341 the command
2342 .RS
2343 .sp
2344 .B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
2345 .sp
2346 .RE
2347 will set up the loop device
2348 .I /dev/loop3
2349 to correspond to the file
2350 .IR /tmp/disk.img ,
2351 and then mount this device on
2352 .IR /mnt .
2353
2354 If no explicit loop device is mentioned
2355 (but just an option `\fB\-o loop\fP' is given), then
2356 .B mount
2357 will try to find some unused loop device and use that, for example
2358 .RS
2359 .sp
2360 .B "mount /tmp/disk.img /mnt \-o loop"
2361 .sp
2362 .RE
2363 The mount command
2364 .B automatically
2365 creates a loop device from a regular file if a filesystem type is
2366 not specified or the filesystem is known for libblkid, for example:
2367 .RS
2368 .sp
2369 .B "mount /tmp/disk.img /mnt"
2370 .sp
2371 .B "mount \-t ext4 /tmp/disk.img /mnt"
2372 .sp
2373 .RE
2374 This type of mount knows about three options, namely
2375 .BR loop ", " offset " and " sizelimit ,
2376 that are really options to
2377 .BR \%losetup (8).
2378 (These options can be used in addition to those specific
2379 to the filesystem type.)
2380
2381 Since Linux 2.6.25 auto-destruction of loop devices is supported,
2382 meaning that any loop device allocated by
2383 .B mount
2384 will be freed by
2385 .B umount
2386 independently of
2387 .IR /etc/mtab .
2388
2389 You can also free a loop device by hand, using
2390 .BR "losetup \-d " or " umount \-d" .
2391
2392 Since util-linux v2.29 mount command re-uses the loop device rather than
2393 initialize a new device if the same backing file is already used for some loop
2394 device with the same offset and sizelimit. This is necessary to avoid
2395 a filesystem corruption.
2396
2397 .SH RETURN CODES
2398 .B mount
2399 has the following return codes (the bits can be ORed):
2400 .TP
2401 .B 0
2402 success
2403 .TP
2404 .B 1
2405 incorrect invocation or permissions
2406 .TP
2407 .B 2
2408 system error (out of memory, cannot fork, no more loop devices)
2409 .TP
2410 .B 4
2411 internal
2412 .B mount
2413 bug
2414 .TP
2415 .B 8
2416 user interrupt
2417 .TP
2418 .B 16
2419 problems writing or locking /etc/mtab
2420 .TP
2421 .B 32
2422 mount failure
2423 .TP
2424 .B 64
2425 some mount succeeded
2426 .RE
2427
2428 The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2429 failed, some succeeded).
2430
2431 .SH "EXTERNAL HELPERS"
2432 The syntax of external mount helpers is:
2433 .sp
2434 .in +4
2435 .BI /sbin/mount. suffix
2436 .I spec dir
2437 .RB [ \-sfnv ]
2438 .RB [ \-N
2439 .IR namespace ]
2440 .RB [ \-o
2441 .IR options ]
2442 .RB [ \-t
2443 .IR type \fB. subtype ]
2444 .in
2445 .sp
2446 where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvoN\fR options have
2447 the same meaning as the normal mount options. The \fB\-t\fR option is used for
2448 filesystems with subtypes support (for example
2449 .BR "/sbin/mount.fuse \-t fuse.sshfs" ).
2450
2451 The command \fBmount\fR does not pass the mount options
2452 .BR unbindable ,
2453 .BR runbindable ,
2454 .BR private ,
2455 .BR rprivate ,
2456 .BR slave ,
2457 .BR rslave ,
2458 .BR shared ,
2459 .BR rshared ,
2460 .BR auto ,
2461 .BR noauto ,
2462 .BR comment ,
2463 .BR x-* ,
2464 .BR loop ,
2465 .B offset
2466 and
2467 .B sizelimit
2468 to the mount.<suffix> helpers. All other options are used in a
2469 comma-separated list as argument to the \fB\-o\fR option.
2470
2471 .SH FILES
2472 See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
2473 .TP 18n
2474 .I /etc/fstab
2475 filesystem table
2476 .TP
2477 .I /run/mount
2478 libmount private runtime directory
2479 .TP
2480 .I /etc/mtab
2481 table of mounted filesystems or symlink to /proc/mounts
2482 .TP
2483 .I /etc/mtab\s+3~\s0
2484 lock file (unused on systems with mtab symlink)
2485 .TP
2486 .I /etc/mtab.tmp
2487 temporary file (unused on systems with mtab symlink)
2488 .TP
2489 .I /etc/filesystems
2490 a list of filesystem types to try
2491 .SH ENVIRONMENT
2492 .IP LIBMOUNT_FSTAB=<path>
2493 overrides the default location of the fstab file (ignored for suid)
2494 .IP LIBMOUNT_MTAB=<path>
2495 overrides the default location of the mtab file (ignored for suid)
2496 .IP LIBMOUNT_DEBUG=all
2497 enables libmount debug output
2498 .IP LIBBLKID_DEBUG=all
2499 enables libblkid debug output
2500 .IP LOOPDEV_DEBUG=all
2501 enables loop device setup debug output
2502 .SH "SEE ALSO"
2503 .na
2504 .BR mount (2),
2505 .BR umount (2),
2506 .BR umount (8),
2507 .BR fstab (5),
2508 .BR nfs (5),
2509 .BR xfs (5),
2510 .BR e2label (8),
2511 .BR findmnt (8),
2512 .BR losetup (8),
2513 .BR mke2fs (8),
2514 .BR mountd (8),
2515 .BR nfsd (8),
2516 .BR swapon (8),
2517 .BR tune2fs (8),
2518 .BR xfs_admin (8)
2519 .ad
2520 .SH BUGS
2521 It is possible for a corrupted filesystem to cause a crash.
2522 .PP
2523 Some Linux filesystems don't support
2524 .BR "\-o sync " nor " \-o dirsync"
2525 (the ext2, ext3, ext4, fat and vfat filesystems
2526 .I do
2527 support synchronous updates (a la BSD) when mounted with the
2528 .B sync
2529 option).
2530 .PP
2531 The
2532 .B "\-o remount"
2533 may not be able to change mount parameters (all
2534 .IR ext2fs -specific
2535 parameters, except
2536 .BR sb ,
2537 are changeable with a remount, for example, but you can't change
2538 .B gid
2539 or
2540 .B umask
2541 for the
2542 .IR fatfs ).
2543 .PP
2544 It is possible that the files
2545 .I /etc/mtab
2546 and
2547 .I /proc/mounts
2548 don't match on systems with a regular mtab file. The first file is based only on
2549 the mount command options, but the content of the second file also depends on
2550 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2551 the mount command may report unreliable information about an NFS mount point
2552 and the /proc/mounts file usually contains more reliable information.) This is
2553 another reason to replace the mtab file with a symlink to the
2554 .I /proc/mounts
2555 file.
2556 .PP
2557 Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
2558 .B fcntl
2559 and
2560 .B ioctl
2561 families of functions) may lead to inconsistent results due to the lack of
2562 a consistency check in the kernel even if noac is used.
2563 .PP
2564 The
2565 .B loop
2566 option with the
2567 .B offset
2568 or
2569 .B sizelimit
2570 options used may fail when using older kernels if the
2571 .B mount
2572 command can't confirm that the size of the block device has been configured
2573 as requested. This situation can be worked around by using
2574 the
2575 .B losetup
2576 command manually before calling
2577 .B mount
2578 with the configured loop device.
2579 .SH HISTORY
2580 A
2581 .B mount
2582 command existed in Version 5 AT&T UNIX.
2583 .SH AUTHORS
2584 .nf
2585 Karel Zak <kzak@redhat.com>
2586 .fi
2587 .SH AVAILABILITY
2588 The mount command is part of the util-linux package and is available from
2589 https://www.kernel.org/pub/linux/utils/util-linux/.