1 .\" Copyright (c) 1996-2004 Andries Brouwer
2 .\" Copyright (C) 2006-2012 Karel Zak <kzak@redhat.com>
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.
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.
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.
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.
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.
30 .TH MOUNT 8 "August 2015" "util-linux" "System Administration"
32 mount \- mount a filesystem
35 .RB [ \-l | \-h | \-V ]
58 All files accessible in a Unix system are arranged in one big
59 tree, the file hierarchy, rooted at
61 These files can be spread out over several devices. The
63 command serves to attach the filesystem found on some device
64 to the big file tree. Conversely, the
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.
69 The standard form of the
75 .BI "mount \-t" " type device dir"
79 This tells the kernel to attach the filesystem found on
85 The option \fB\-t \fItype\fR is optional. The
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
91 become invisible, and as long as this filesystem remains mounted,
94 refers to the root of the filesystem on
97 If only the directory or the device is given, for example:
103 then \fBmount\fR looks for a mountpoint (and if not found then for a device) in the
105 file. It's possible to use the
109 options to avoid ambivalent interpretation of the given argument. For example:
112 .B mount \-\-target /mountpoint
116 The same filesystem may be mounted more than once, and in some cases (e.g.
117 network filesystems) the same filesystem may 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 the kernel and it is usually
120 specific to the 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).
123 .SS Listing the mounts
124 The listing mode is maintained for backward compatibility only.
126 For more robust and customizable output use
128 \fBespecially in your scripts\fP. Note that control characters in the
129 mountpoint name are replaced with '?'.
131 The following command lists all mounted filesystems (of type
135 .BR "mount " [ \-l "] [" "\-t \fItype\/\fP" ]
138 The option \fB\-l\fR adds labels to this listing. See below.
140 .SS Indicating the device and filesystem
141 Most devices are indicated by a filename (of a block special device), like
143 but there are other possibilities. For example, in the case of an NFS mount,
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
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
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.
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.
166 The recommended setup is to use tags (e.g.\& \fBUUID=\fIuuid\fR) rather than
167 .I /dev/disk/by-{label,uuid,partuuid,partlabel}
171 more readable, robust and portable. The
173 command internally uses udev
174 symlinks, so the use of symlinks in /etc/fstab has no advantage over tags.
180 uses UUIDs as strings. The UUIDs from the command line or from
182 are not converted to internal binary representation. The string representation
183 of the UUID should be based on lower case characters.
187 filesystem is not associated with a special device, and when
188 mounting it, an arbitrary keyword, such as
190 can be used instead of a device specification.
191 (The customary choice
193 is less fortunate: the error message `none already mounted' from
197 .SS The files /etc/fstab, /etc/mtab and /proc/mounts
202 may contain lines describing what devices are usually
203 mounted where, using which options. The default location of the
205 file can be overridden with the
206 .BI \-\-fstab " path"
207 command-line option (see below for more details).
219 (usually given in a bootscript) causes all filesystems mentioned in
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
226 option will make \fBmount\fR fork, so that the
227 filesystems are mounted simultaneously.
229 When mounting a filesystem mentioned in
233 it suffices to specify on the command line only the device, or only the mount point.
239 traditionally maintained a list of currently mounted filesystems in the file
241 The support for regular classic
243 is completely disabled in compile time by default, because on current Linux
244 systems it is better to make it a symlink to
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.
251 If no arguments are given to
253 the list of mounted filesystems is printed.
255 If you want to override mount options from
257 you have to use the \fB\-o\fR option:
260 .BI mount " device" \fR| "dir " \-o " options"
263 and then the mount options from the command line will be appended to
264 the list of options from
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
273 program does not read the
277 (or LABEL, UUID, PARTUUID or PARTLABEL) and
279 are specified. For example, to mount device
280 .BR foo " at " /dir :
283 .B "mount /dev/foo /dir"
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
290 always read fstab configuration.
292 .SS Non-superuser mounts
293 Normally, only the superuser can mount filesystems.
298 option on a line, anybody can mount the corresponding filesystem.
303 .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
306 any user can mount the iso9660 filesystem found on an inserted CDROM
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.
318 For more details, see
320 Only the user that mounted a filesystem can unmount it again.
321 If any user should be able to unmount it, then use
330 option is similar to the
332 option, with the restriction that the user must be the owner
333 of the special file. This may be useful e.g.\& for
335 if a login script makes the console user owner of this device.
338 option is similar, with the restriction that the user must be
339 member of the group of the special file.
341 .SS Bind mount operation
342 Remount part of the file hierarchy somewhere else. The call is:
350 or by using this fstab entry:
359 After this call the same contents are accessible in two places.
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 may be umounted.
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:
373 .B mount \-\-bind foo foo
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:
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
390 and it's necessary explicitly specify the options on mount command line.
393 since v2.27 allows to change the mount options by passing the
394 relevant options along with
400 .B mount -o bind,ro foo foo
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.
407 The alternative (classic) way to create a read-only bind mount is to use the remount
408 operation, for example:
415 .B mount \-o remount,bind,ro
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
422 will be writable, but the
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).
432 since v2.31 ignores the \fBbind\fR flag from
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
441 behavior does not affect situations when "remount,bind" is specified in the
445 .SS The move operation
448 to another place (atomically). The call is:
456 This will cause the contents which previously appeared under
458 to now be accessible under
460 The physical location of the files is not changed.
463 has to be a mountpoint.
465 Note also that moving a mount residing under a shared mount is invalid and
467 .B findmnt \-o TARGET,PROPAGATION
468 to see the current propagation flags.
470 .SS Shared subtree operations
471 Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
472 private, slave or unbindable. A shared mount provides the ability to create mirrors
473 of that mount such that mounts and unmounts within any of the mirrors propagate
474 to the other mirror. A slave mount receives propagation from its master, but
475 not vice versa. A private mount carries no propagation abilities. An
476 unbindable mount is a private mount which cannot be cloned through a bind
477 operation. The detailed semantics are documented in
478 .I Documentation/filesystems/sharedsubtree.txt
479 file in the kernel source tree.
481 Supported operations are:
485 .BI "mount \-\-make\-shared " mountpoint
486 .BI "mount \-\-make\-slave " mountpoint
487 .BI "mount \-\-make\-private " mountpoint
488 .BI "mount \-\-make\-unbindable " mountpoint
492 The following commands allow one to recursively change the type of all the
493 mounts under a given mountpoint.
497 .BI "mount \-\-make\-rshared " mountpoint
498 .BI "mount \-\-make\-rslave " mountpoint
499 .BI "mount \-\-make\-rprivate " mountpoint
500 .BI "mount \-\-make\-runbindable " mountpoint
507 when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
508 specified on the command line.
510 Note that the Linux kernel does not allow to change multiple propagation flags
513 system call, and the flags cannot be mixed with other mount options and operations.
515 Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
516 (topology) changes by one mount(8) call and do it also together with other
517 mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
518 by additional \fBmount\fR(2) system calls when the preceding mount operations
519 were successful. Note that this use case is not atomic. It is possible to
520 specify the propagation flags in
536 .B mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo
544 .B mount /dev/sda1 /foox
545 .B mount \-\-make\-private /foo
546 .B mount \-\-make\-unbindable /foo
550 .SH COMMAND-LINE OPTIONS
551 The full set of mount options used by an invocation of
553 is determined by first extracting the
554 mount options for the filesystem from the
556 table, then applying any options specified by the
558 argument, and finally applying a
560 option, when present.
562 The command \fBmount\fR does not pass all command-line options to the
563 \fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
564 and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
566 Command-line options available for the
571 Mount all filesystems (of the given types) mentioned in
573 (except for those whose line contains the
575 keyword). The filesystems are mounted following their order in
577 The mount command compares filesystem source, target (and fs root for bind
578 mount or btrfs) to detect already mounted filesystems. The kernel table with
579 already mounted filesystems is cached during \fBmount \-\-all\fR. It means
580 that all duplicated fstab entries will be mounted.
582 The option \fB\-\-all\fR is possible to use for remount operation too. In this
583 case all filters (\fB\-t\fR and \fB\-O\fR) are applied to the table of already
586 Note that it is a bad practice to use \fBmount \-a\fR for
588 checking. The recommended solution is \fBfindmnt \-\-verify\fR.
590 .BR \-B , " \-\-bind"
591 Remount a subtree somewhere else (so that its contents are available
592 in both places). See above, under \fBBind mounts\fR.
594 .BR \-c , " \-\-no\-canonicalize"
595 Don't canonicalize paths. The mount command canonicalizes all paths
596 (from command line or fstab) by default. This option can be used
599 flag for already canonicalized absolute paths. The option is designed for mount
600 helpers which call \fBmount -i\fR. It is strongly recommended to not use this
601 command-line option for normal mount operations.
603 Note that \fBmount\fR(8) does not pass this option to the
604 \fB/sbin/mount.\fItype\fR helpers.
606 .BR \-F , " \-\-fork"
607 (Used in conjunction with
609 Fork off a new incarnation of \fBmount\fR for each device.
610 This will do the mounts on different devices or different NFS servers
612 This has the advantage that it is faster; also NFS timeouts go in
613 parallel. A disadvantage is that the mounts are done in undefined order.
614 Thus, you cannot use this option if you want to mount both
618 .IP "\fB\-f, \-\-fake\fP"
619 Causes everything to be done except for the actual system call; if it's not
620 obvious, this ``fakes'' mounting the filesystem. This option is useful in
623 flag to determine what the
625 command is trying to do. It can also be used to add entries for devices
626 that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
627 checks for an existing record in /etc/mtab and fails when the record already
628 exists (with a regular non-fake mount, this check is done by the kernel).
629 .IP "\fB\-i, \-\-internal\-only\fP"
630 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
632 .BR \-L , " \-\-label " \fIlabel
633 Mount the partition that has the specified
636 .BR \-l , " \-\-show\-labels"
637 Add the labels in the mount output. \fBmount\fR must have
638 permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
639 One can set such a label for ext2, ext3 or ext4 using the
641 utility, or for XFS using
643 or for reiserfs using
644 .BR reiserfstune (8).
646 .BR \-M , " \-\-move"
647 Move a subtree to some other place. See above, the subsection
648 \fBThe move operation\fR.
650 .BR \-n , " \-\-no\-mtab"
651 Mount without writing in
653 This is necessary for example when
655 is on a read-only filesystem.
657 .BR \-N , " \-\-namespace " \fIns
658 Perform mount in namespace specified by \fIns\fR.
659 \fIns\fR is either PID of process running in that namespace
660 or special file representing that namespace.
663 switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
665 system call, otherwise it runs in the original namespace. It means that the target namespace does not have
666 to contain any libraries or another requirements necessary to execute
670 See \fBnamespaces\fR(7) for more information.
672 .BR \-O , " \-\-test\-opts " \fIopts
673 Limit the set of filesystems to which the
675 option applies. In this regard it is like the
681 For example, the command:
685 .B "mount \-a \-O no_netdev"
688 mounts all filesystems except those which have the option
690 specified in the options field in the
696 in that each option is matched exactly; a leading
698 at the beginning of one option does not negate the rest.
704 options are cumulative in effect; that is, the command
707 .B "mount \-a \-t ext2 \-O _netdev"
710 mounts all ext2 filesystems with the _netdev option, not all filesystems
711 that are either ext2 or have the _netdev option specified.
714 .BR \-o , " \-\-options " \fIopts
715 Use the specified mount options. The \fIopts\fR argument is
716 a comma-separated list. For example:
720 .B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
724 For more details, see the
725 .B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
727 .B FILESYSTEM-SPECIFIC MOUNT OPTIONS
732 .BR "\-\-options\-mode " \fImode
733 Controls how to combine options from fstab/mtab with options from command line.
734 \fImode\fR can be one of
735 .BR ignore ", " append ", " prepend " or " replace .
736 For example \fBappend\fR means that options from fstab are appended to options from command line.
737 Default value is \fBprepend\fR -- it means command line options are evaluated after fstab options.
738 Note that the last option wins if there are conflicting ones.
741 .BR "\-\-options\-source " \fIsource
742 Source of default options.
743 \fIsource\fR is comma separated list of
744 .BR fstab ", " mtab " and " disable .
745 \fBdisable\fR disables
746 .BR fstab " and " mtab
747 and disables \fB\-\-options\-source\-force\fR.
748 Default value is \fBfstab,mtab\fR.
751 .B \-\-options\-source\-force
752 Use options from fstab/mtab even if both \fIdevice\fR and \fIdir\fR are specified.
755 .BR \-R , " \-\-rbind"
756 Remount a subtree and all possible submounts somewhere else (so that its
757 contents are available in both places). See above, the subsection
760 .BR \-r , " \-\-read\-only"
761 Mount the filesystem read-only. A synonym is
764 Note that, depending on the filesystem type, state and kernel behavior, the
765 system may still write to the device. For example, ext3 and ext4 will replay the
766 journal if the filesystem is dirty. To prevent this kind of write access, you
767 may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
768 options or set the block device itself to read-only mode, see the
773 Tolerate sloppy mount options rather than failing. This will ignore mount
774 options not supported by a filesystem type. Not all filesystems support this
775 option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
777 .BI \-\-source " device"
778 If only one argument for the mount command is given then the argument might be
779 interpreted as target (mountpoint) or source (device). This option allows to
780 explicitly define that the argument is the mount source.
782 .BI \-\-target " directory"
783 If only one argument for the mount command is given then the argument might be
784 interpreted as target (mountpoint) or source (device). This option allows to
785 explicitly define that the argument is the mount target.
787 .BR \-T , " \-\-fstab " \fIpath
788 Specifies an alternative fstab file. If \fIpath\fP is a directory then the files
789 in the directory are sorted by
791 files that start with "."\& or without an \&.fstab extension are ignored. The option
792 can be specified more than once. This option is mostly designed for initramfs
793 or chroot scripts where additional configuration is specified beyond standard
794 system configuration.
796 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
797 \fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
798 invisible for the helpers. This is no problem for normal mounts, but user
799 (non-root) mounts always require fstab to verify the user's rights.
801 .BR \-t , " \-\-types " \fIfstype
802 The argument following the
804 is used to indicate the filesystem type. The filesystem types which are
805 currently supported depend on the running kernel. See
808 .I /lib/modules/$(uname -r)/kernel/fs
809 for a complete list of the filesystems. The most common are ext2, ext3, ext4,
810 xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
816 support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
817 example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
818 any prefix to the mount source (for example 'sshfs#example.com' is
823 option is given, or if the
825 type is specified, mount will try to guess the desired type.
826 Mount uses the blkid library for guessing the filesystem
827 type; if that does not turn up anything that looks familiar,
828 mount will try to read the file
829 .IR /etc/filesystems ,
830 or, if that does not exist,
831 .IR /proc/filesystems .
832 All of the filesystem types listed there will be tried,
833 except for those that are labeled "nodev" (e.g.\&
840 ends in a line with a single *, mount will read
842 afterwards. While trying, all filesystem types will be
843 mounted with the mount option \fBsilent\fR.
847 type may be useful for user-mounted floppies.
850 can be useful to change the probe order (e.g., to try vfat before msdos
851 or ext3 before ext2) or if you use a kernel module autoloader.
853 More than one type may be specified in a comma-separated
858 entry. The list of filesystem types for option
862 to specify the filesystem types on which no action should be taken.
865 has no effect when specified in an
871 can be meaningful with the
873 option. For example, the command
877 .B "mount \-a \-t nomsdos,smbfs"
880 mounts all filesystems except those of type
885 For most types all the
887 program has to do is issue a simple
889 system call, and no detailed knowledge of the filesystem type is required.
890 For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
891 necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
892 have a separate mount program. In order to make it possible to
893 treat all types in a uniform way, \fBmount\fR will execute the program
894 .BI /sbin/mount. type
895 (if that exists) when called with type
897 Since different versions of the
899 program have different calling conventions,
901 may have to be a shell script that sets up the desired call.
904 .BR \-U , " \-\-uuid " \fIuuid
905 Mount the partition that has the specified
908 .BR \-v , " \-\-verbose"
911 .BR \-w , " \-\-rw" , " \-\-read\-write"
912 Mount the filesystem read/write. The read-write is kernel default. A synonym is
915 Note that specify \fB\-w\fR on command line forces \fBmount\fR command
916 to never try read-only mount on write-protected devices. The default is
917 try read-only if the previous mount syscall with read-write flags failed.
919 .BR \-V , " \-\-version"
920 Display version information and exit.
922 .BR \-h , " \-\-help"
923 Display help text and exit.
925 .SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
926 Some of these options are only useful when they appear in the
930 Some of these options could be enabled or disabled by default
931 in the system kernel. To check the current setting see the options
932 in /proc/mounts. Note that filesystems also have per-filesystem
933 specific default mount options (see for example \fBtune2fs \-l\fP
934 output for extN filesystems).
936 The following options apply to any filesystem that is being
937 mounted (but not every filesystem actually honors them \(en e.g.\&, the
939 option today has an effect only for ext2, ext3, ext4, fat, vfat, ufs and xfs):
943 All I/O to the filesystem should be done asynchronously. (See also the
948 Do not use the \fBnoatime\fR feature, so the inode access time is controlled
949 by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
954 Do not update inode access times on this filesystem (e.g.\& for faster
955 access on the news spool to speed up news servers). This works for all
956 inode types (directories too), so it implies \fB\%nodiratime\fR.
959 Can be mounted with the
964 Can only be mounted explicitly (i.e., the
966 option will not cause the filesystem to be mounted).
969 .BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
973 option is useful when mounting filesystems that do not support
974 extended attributes, such as a floppy or hard disk formatted with VFAT, or
975 systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
977 disk from a non-SELinux workstation. You can also use
979 on filesystems you do not trust, such as a floppy. It also helps in compatibility with
980 xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
981 xattrs are supported, you can save time not having to label every file by
982 assigning the entire disk one security context.
984 A commonly used option for removable media is
985 .BR \%context="system_u:object_r:removable_t" .
987 Two other options are
991 both of which are mutually exclusive of the context option. This means you
992 can use fscontext and defcontext with each other, but neither can be used with
997 option works for all filesystems, regardless of their xattr
998 support. The fscontext option sets the overarching filesystem label to a
999 specific security context. This filesystem label is separate from the
1000 individual labels on the files. It represents the entire filesystem for
1001 certain kinds of permission checks, such as during mount or file creation.
1002 Individual file labels are still obtained from the xattrs on the files
1003 themselves. The context option actually sets the aggregate context that
1004 fscontext provides, in addition to supplying the same label for individual
1007 You can set the default security context for unlabeled files using
1009 option. This overrides the value set for unlabeled files in the policy and requires a
1010 filesystem that supports xattr labeling.
1014 option allows you to explicitly label the root inode of a FS being mounted
1015 before that FS or inode becomes visible to userspace. This was found to be
1016 useful for things like stateless linux.
1018 Note that the kernel rejects any remount request that includes the context
1019 option, \fBeven\fP when unchanged from the current context.
1021 .BR "Warning: the \fIcontext\fP value might contain commas" ,
1022 in which case the value has to be properly quoted, otherwise
1024 will interpret the comma as a separator between mount options. Don't forget that
1025 the shell strips off quotes and thus
1026 .BR "double quoting is required" .
1032 .B mount \-t tmpfs none /mnt \-o \e
1033 .B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
1037 For more details, see
1043 Use the default options:
1044 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
1046 Note that the real set of all default mount options depends on kernel
1047 and filesystem type. See the beginning of this section for more details.
1050 Interpret character or block special devices on the filesystem.
1053 Do not interpret character or block special devices on the file
1057 Update directory inode access times on this filesystem. This is the default.
1058 (This option is ignored when \fBnoatime\fR is set.)
1061 Do not update directory inode access times on this filesystem.
1062 (This option is implied when \fBnoatime\fR is set.)
1065 All directory updates within the filesystem should be done synchronously.
1066 This affects the following system calls: creat, link, unlink, symlink,
1067 mkdir, rmdir, mknod and rename.
1070 Permit execution of binaries.
1073 Do not permit direct execution of any binaries on the mounted filesystem.
1076 Allow an ordinary user to mount the filesystem if one
1077 of that user's groups matches the group of the device.
1078 This option implies the options
1079 .BR nosuid " and " nodev
1080 (unless overridden by subsequent options, as in the option line
1081 .BR group,dev,suid ).
1084 Every time the inode is modified, the i_version field will be incremented.
1087 Do not increment the i_version inode field.
1090 Allow mandatory locks on this filesystem. See
1094 Do not allow mandatory locks on this filesystem.
1097 The filesystem resides on a device that requires network access
1098 (used to prevent the system from attempting to mount these filesystems
1099 until the network has been enabled on the system).
1102 Do not report errors for this device if it does not exist.
1105 Update inode access times relative to modify or change time. Access
1106 time is only updated if the previous access time was earlier than the
1107 current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
1108 break \fBmutt\fR or other applications that need to know if a file has been
1109 read since the last time it was modified.)
1111 Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1114 was specified), and the
1116 option is required to obtain traditional semantics. In addition, since Linux
1117 2.6.30, the file's last access time is always updated if it is more than 1
1123 feature. See also the
1128 Allows to explicitly request full atime updates. This makes it
1129 possible for the kernel to default to
1133 but still allow userspace to override it. For more details about the default
1134 system mount options see /proc/mounts.
1137 Use the kernel's default behavior for inode access time updates.
1140 Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1142 This mount option significantly reduces writes to the inode table for
1143 workloads that perform frequent random writes to preallocated files.
1145 The on-disk timestamps are updated only when:
1148 - the inode needs to be updated for some change unrelated to file timestamps
1150 - the application employs
1156 - an undeleted inode is evicted from memory
1158 - more than 24 hours have passed since the i-node was written to disk.
1163 Do not use the lazytime feature.
1166 Honor set-user-ID and set-group-ID bits or file capabilities when
1167 executing programs from this filesystem.
1170 Do not honor set-user-ID and set-group-ID bits or file capabilities when
1171 executing programs from this filesystem.
1174 Turn on the silent flag.
1177 Turn off the silent flag.
1180 Allow an ordinary user to mount the filesystem if that
1181 user is the owner of the device.
1182 This option implies the options
1183 .BR nosuid " and " nodev
1184 (unless overridden by subsequent options, as in the option line
1185 .BR owner,dev,suid ).
1188 Attempt to remount an already-mounted filesystem. This is commonly
1189 used to change the mount flags for a filesystem, especially to make a
1190 readonly filesystem writable. It does not change device or mount point.
1192 The remount operation together with the
1194 flag has special semantic. See above, the subsection \fBBind mounts\fR.
1196 The remount functionality follows the standard way the mount command works
1197 with options from fstab. This means that \fBmount\fR does not
1198 read fstab (or mtab) only when both
1205 .B "mount \-o remount,rw /dev/foo /dir"
1208 After this call all old mount options are replaced and arbitrary stuff from
1209 fstab (or mtab) is ignored, except the loop= option which is internally
1210 generated and maintained by the mount command.
1213 .B "mount \-o remount,rw /dir"
1216 After this call, mount reads fstab and merges these options with
1217 the options from the command line (\fB\-o\fR).
1218 If no mountpoint is found in fstab, then a remount with unspecified source is
1221 mount(8) allows to use \fB\-\-all\fR to remount all already mounted filesystems
1222 which match a specified filter (\fB\-O\fR and \fB\-t\fR). For example:
1225 .B "mount \-\-all \-o remount,ro -t vfat"
1228 remounts all already mounted vfat filesystems in read-only mode. The each of the
1229 filesystems is remounted by "mount \-o remount,ro /dir" semantic. It means the
1230 mount command reads fstab or mtab and merges these options with the options
1231 from the command line.
1234 Mount the filesystem read-only.
1237 Mount the filesystem read-write.
1240 All I/O to the filesystem should be done synchronously. In the case of
1241 media with a limited number of write cycles
1242 (e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
1245 Allow an ordinary user to mount the filesystem.
1246 The name of the mounting user is written to the mtab file (or to the private
1247 libmount file in /run/mount on systems without a regular mtab) so that this
1248 same user can unmount the filesystem again.
1249 This option implies the options
1250 .BR noexec ", " nosuid ", and " nodev
1251 (unless overridden by subsequent options, as in the option line
1252 .BR user,exec,dev,suid ).
1255 Forbid an ordinary user to mount the filesystem.
1256 This is the default; it does not imply any other options.
1259 Allow any user to mount and to unmount the filesystem, even
1260 when some other ordinary user mounted it.
1261 This option implies the options
1262 .BR noexec ", " nosuid ", and " nodev
1263 (unless overridden by subsequent options, as in the option line
1264 .BR users,exec,dev,suid ).
1267 All options prefixed with "X-" are interpreted as comments or as userspace
1268 application-specific options. These options are not stored in the user space (e.g. mtab file),
1269 nor sent to the mount.\fItype\fR helpers nor to the
1271 system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
1274 The same as \fBX-*\fR options, but stored permanently in the user space. It
1275 means the options are also available for umount or another operations. Note
1276 that maintain mount options in user space is tricky, because it's necessary use
1277 libmount based tools and there is no guarantee that the options will be always
1278 available (for example after a move mount operation or in unshared namespace).
1280 Note that before util-linux v2.30 the x-* options have not been maintained by
1281 libmount and stored in user space (functionality was the same as have X-* now),
1282 but due to growing number of use-cases (in initrd, systemd etc.) the
1283 functionality have been extended to keep existing fstab configurations usable
1286 .BR X-mount.mkdir [ = \fImode\fR ]
1287 Allow to make a target directory (mountpoint). The optional argument
1289 specifies the filesystem access mode used for
1291 in octal notation. The default mode is 0755. This functionality is supported
1292 only for root users. The option is also supported as x-mount.mkdir, this notation
1293 is deprecated for mount.mkdir since v2.30.
1295 .SH "FILESYSTEM-SPECIFIC MOUNT OPTIONS"
1296 You should consult the respective man page for the filesystem first.
1297 If you want to know what options the ext4 filesystem supports, then check the
1300 If that doesn't exist, you can also check the corresponding mount page like
1302 Note that you might have to install the respective userland tools.
1304 The following options apply only to certain filesystems.
1305 We sort them by filesystem. They all follow the
1309 What options are supported depends a bit on the running kernel.
1310 More info may be found in the kernel source subdirectory
1311 .IR Documentation/filesystems .
1313 .SS "Mount options for adfs"
1315 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1316 Set the owner and group of the files in the filesystem (default: uid=gid=0).
1318 \fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
1319 Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1320 respectively (default: 0700 and 0077, respectively).
1322 .IR /usr/src/linux/Documentation/filesystems/adfs.txt .
1324 .SS "Mount options for affs"
1326 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1327 Set the owner and group of the root of the filesystem (default: uid=gid=0,
1332 without specified value, the UID and GID of the current process are taken).
1334 \fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
1335 Set the owner and group of all files.
1338 Set the mode of all files to
1340 disregarding the original permissions.
1341 Add search permission to directories that have read permission.
1342 The value is given in octal.
1345 Do not allow any changes to the protection bits on the filesystem.
1348 Set UID and GID of the root of the filesystem to the UID and GID
1349 of the mount point upon the first sync or umount, and then
1350 clear this option. Strange...
1353 Print an informational message for each successful mount.
1356 Prefix used before volume name, when following a link.
1359 Prefix (of length at most 30) used before '/' when following a symbolic link.
1362 (Default: 2.) Number of unused blocks at the start of the device.
1365 Give explicitly the location of the root block.
1368 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1370 .BR grpquota | noquota | quota | usrquota
1371 These options are accepted but ignored.
1372 (However, quota utilities may react to such strings in
1375 .SS "Mount options for debugfs"
1376 The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1377 .IR /sys/kernel/debug .
1379 .\" present since 2.6.11
1380 As of kernel version 3.4, debugfs has the following options:
1382 .BI uid= n ", gid=" n
1383 Set the owner and group of the mountpoint.
1386 Sets the mode of the mountpoint.
1388 .SS "Mount options for devpts"
1389 The devpts filesystem is a pseudo filesystem, traditionally mounted on
1391 In order to acquire a pseudo terminal, a process opens
1393 the number of the pseudo terminal is then made available to the process
1394 and the pseudo terminal slave can be accessed as
1395 .IR /dev/pts/ <number>.
1397 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1398 This sets the owner or the group of newly created PTYs to
1399 the specified values. When nothing is specified, they will
1400 be set to the UID and GID of the creating process.
1401 For example, if there is a tty group with GID 5, then
1403 will cause newly created PTYs to belong to the tty group.
1406 Set the mode of newly created PTYs to the specified value.
1407 The default is 0600.
1412 makes "mesg y" the default on newly created PTYs.
1415 Create a private instance of devpts filesystem, such that
1416 indices of ptys allocated in this new instance are
1417 independent of indices created in other instances of devpts.
1419 All mounts of devpts without this
1421 option share the same set of pty indices (i.e. legacy mode).
1422 Each mount of devpts with the
1424 option has a private set of pty indices.
1426 This option is mainly used to support containers in the
1427 linux kernel. It is implemented in linux kernel versions
1428 starting with 2.6.29. Further, this mount option is valid
1429 only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1430 kernel configuration.
1432 To use this option effectively,
1434 must be a symbolic link to
1437 .I Documentation/filesystems/devpts.txt
1438 in the linux kernel source tree for details.
1442 Set the mode for the new
1444 device node in the devpts filesystem.
1446 With the support for multiple instances of devpts (see
1448 option above), each instance has a private
1450 node in the root of the devpts filesystem (typically
1451 .IR /dev/pts/ptmx ).
1453 For compatibility with older versions of the kernel, the
1454 default mode of the new
1458 specifies a more useful mode for the
1460 node and is highly recommended when the
1462 option is specified.
1464 This option is only implemented in linux kernel versions
1465 starting with 2.6.29. Further, this option is valid only if
1466 CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1469 .SS "Mount options for fat"
1472 is not a separate filesystem, but a common part of the
1479 .BR blocksize= { 512 | 1024 | 2048 }
1480 Set blocksize (default 512). This option is obsolete.
1482 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1483 Set the owner and group of all files.
1484 (Default: the UID and GID of the current process.)
1487 Set the umask (the bitmask of the permissions that are
1489 present). The default is the umask of the current process.
1490 The value is given in octal.
1493 Set the umask applied to directories only.
1494 The default is the umask of the current process.
1495 The value is given in octal.
1498 Set the umask applied to regular files only.
1499 The default is the umask of the current process.
1500 The value is given in octal.
1502 .BI allow_utime= value
1503 This option controls the permission check of mtime/atime.
1507 If current process is in group of file's group ID, you can change timestamp.
1510 Other users can change timestamp.
1512 The default is set from `dmask' option. (If the directory is writable,
1514 is also allowed. I.e.\& \s+3~\s0dmask & 022)
1518 checks current process is owner of the file, or it has
1519 CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
1520 normal check is too inflexible. With this option you can relax it.
1524 Three different levels of pickiness can be chosen:
1528 Upper and lower case are accepted and equivalent, long name parts are
1530 .I verylongname.foobar
1533 leading and embedded spaces are accepted in each name part (name and extension).
1536 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1537 rejected. This is the default.
1540 Like "normal", but names that contain long parts or special characters
1541 that are sometimes used on Linux but are not accepted by MS-DOS
1542 (+, =, etc.) are rejected.
1546 Sets the codepage for converting to shortname characters on FAT
1547 and VFAT filesystems. By default, codepage 437 is used.
1550 This option is obsolete and may fail or being ignored.
1552 .BI cvf_format= module
1553 Forces the driver to use the CVF (Compressed Volume File) module
1555 instead of auto-detection. If the kernel supports kmod, the
1556 cvf_format=xxx option also controls on-demand CVF module loading.
1557 This option is obsolete.
1559 .BI cvf_option= option
1560 Option passed to the CVF module. This option is obsolete.
1565 flag. A version string and a list of filesystem parameters will be
1566 printed (these data are also printed if the parameters appear to be
1570 If set, causes discard/TRIM commands to be issued to the block device
1571 when blocks are freed. This is useful for SSD devices and
1572 sparse/thinly-provisioned LUNs.
1575 If set, use a fallback default BIOS Parameter Block configuration, determined
1576 by backing device size. These static parameters match defaults assumed by DOS
1577 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1579 .BR errors= { panic | continue | remount-ro }
1580 Specify FAT behavior on critical errors: panic, continue without doing
1581 anything, or remount the partition in read-only mode (default behavior).
1583 .BR fat= { 12 | 16 | 32 }
1584 Specify a 12, 16 or 32 bit fat. This overrides
1585 the automatic FAT type detection routine. Use with caution!
1587 .BI iocharset= value
1588 Character set to use for converting between 8 bit characters
1589 and 16 bit Unicode characters. The default is iso8859-1.
1590 Long filenames are stored on disk in Unicode format.
1592 .BR nfs= { stale_rw | nostale_ro }
1593 Enable this only if you want to export the FAT filesystem over NFS.
1596 This option maintains an index (cache) of directory inodes which is used by the
1597 nfs-related code to improve look-ups. Full file operations (read/write) over
1598 NFS are supported but with cache eviction at NFS server, this could result in
1604 This option bases the inode number and file handle
1605 on the on-disk location of a file in the FAT directory entry.
1608 will not be returned after a file is
1609 evicted from the inode cache. However, it means that operations
1610 such as rename, create and unlink could cause file handles that
1611 previously pointed at one file to point at a different file,
1612 potentially causing data corruption. For this reason, this
1613 option also mounts the filesystem readonly.
1615 To maintain backward compatibility, '-o nfs' is also accepted,
1620 This option disables the conversion of timestamps
1621 between local time (as used by Windows on FAT) and UTC
1622 (which Linux uses internally). This is particularly
1623 useful when mounting devices (like digital cameras)
1624 that are set to UTC in order to avoid the pitfalls of
1627 .BI time_offset= minutes
1628 Set offset for conversion of timestamps from local time used by FAT to UTC.
1631 will be subtracted from each timestamp to convert it to UTC used
1632 internally by Linux. This is useful when the time zone set in the kernel via
1633 .BR settimeofday (2)
1634 is not the time zone used by the filesystem. Note
1635 that this option still does not provide correct time stamps in all cases in
1636 presence of DST - time stamps in a different DST setting will be off by one
1642 flag. Attempts to chown or chmod files do not return errors,
1643 although they fail. Use with caution!
1646 FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
1647 directory will just be ignored, and is used only by applications as a flag
1648 (e.g.\& it's set for the customized folder).
1650 If you want to use ATTR_RO as read-only flag even for the directory, set this
1654 If set, the execute permission bits of the file will be allowed only if
1655 the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
1658 If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1662 If set, the filesystem will try to flush to disk more early than normal.
1666 Use the "free clusters" value stored on FSINFO. It'll
1667 be used to determine number of free clusters without
1668 scanning disk. But it's not used by default, because
1669 recent Windows don't update it correctly in some
1670 case. If you are sure the "free clusters" on FSINFO is
1671 correct, by this option you can avoid scanning disk.
1673 .BR dots ", " nodots ", " dotsOK= [ yes | no ]
1674 Various misguided attempts to force Unix or DOS conventions
1675 onto a FAT filesystem.
1677 .SS "Mount options for hfs"
1679 .BI creator= cccc ", type=" cccc
1680 Set the creator/type values as shown by the MacOS finder
1681 used for creating new files. Default values: '????'.
1683 .BI uid= n ", gid=" n
1684 Set the owner and group of all files.
1685 (Default: the UID and GID of the current process.)
1687 .BI dir_umask= n ", file_umask=" n ", umask=" n
1688 Set the umask used for all directories, all regular files, or all
1689 files and directories. Defaults to the umask of the current process.
1692 Select the CDROM session to mount.
1693 Defaults to leaving that decision to the CDROM driver.
1694 This option will fail with anything but a CDROM as underlying device.
1697 Select partition number n from the device.
1698 Only makes sense for CDROMs.
1699 Defaults to not parsing the partition table at all.
1702 Don't complain about invalid mount options.
1704 .SS "Mount options for hpfs"
1706 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1707 Set the owner and group of all files. (Default: the UID and GID
1708 of the current process.)
1711 Set the umask (the bitmask of the permissions that are
1713 present). The default is the umask of the current process.
1714 The value is given in octal.
1716 .BR case= { lower | asis }
1717 Convert all files names to lower case, or leave them.
1722 This option is obsolete and may fail or being ignored.
1725 Do not abort mounting when certain consistency checks fail.
1727 .SS "Mount options for iso9660"
1728 ISO 9660 is a standard describing a filesystem structure to be used
1729 on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1735 filenames appear in an 8.3 format (i.e., DOS-like restrictions on filename
1736 length), and in addition all characters are in upper case. Also there is
1737 no field for file ownership, protection, number of links, provision for
1738 block/character devices, etc.
1740 Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1741 features. Basically there are extensions to each directory record that
1742 supply all of the additional information, and when Rock Ridge is in use,
1743 the filesystem is indistinguishable from a normal UNIX filesystem (except
1744 that it is read-only, of course).
1747 Disable the use of Rock Ridge extensions, even if available. Cf.\&
1751 Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1754 .BR check= { r [ elaxed ]| s [ trict ]}
1757 a filename is first converted to lower case before doing the lookup.
1758 This is probably only meaningful together with
1765 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1766 Give all files in the filesystem the indicated user or group id,
1767 possibly overriding the information found in the Rock Ridge extensions.
1771 .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1772 For non-Rock Ridge volumes, normal name translation maps upper
1773 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1776 no name translation is done. See
1783 but also apply Acorn extensions if present.
1786 For non-Rock Ridge volumes, give all files the indicated mode.
1787 (Default: read and execute permission for everybody.)
1788 Octal mode values require a leading 0.
1791 Also show hidden and associated files.
1792 (If the ordinary files and the associated or hidden files have
1793 the same filenames, this may make the ordinary files inaccessible.)
1795 .BR block= { 512 | 1024 | 2048 }
1796 Set the block size to the indicated value.
1801 This option is obsolete and may fail or being ignored.
1804 If the high byte of the file length contains other garbage,
1805 set this mount option to ignore the high order bits of the file length.
1806 This implies that a file cannot be larger than 16\ MB.
1809 Select number of session on multisession CD.
1812 Session begins from sector xxx.
1814 The following options are the same as for vfat and specifying them only makes
1815 sense when using discs encoded using Microsoft's Joliet extensions.
1817 .BI iocharset= value
1818 Character set to use for converting 16 bit Unicode characters on CD
1819 to 8 bit characters. The default is iso8859-1.
1822 Convert 16 bit Unicode characters on CD to UTF-8.
1824 .SS "Mount options for jfs"
1827 Character set to use for converting from Unicode to ASCII. The default is
1828 to do no conversion. Use
1830 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1836 Resize the volume to
1838 blocks. JFS only supports growing a volume, not shrinking it. This option
1839 is only valid during a remount, when the volume is mounted read-write. The
1841 keyword with no value will grow the volume to the full size of the partition.
1844 Do not write to the journal. The primary use of this option is to allow
1845 for higher performance when restoring a volume from backup media. The
1846 integrity of the volume is not guaranteed if the system abnormally ends.
1849 Default. Commit metadata changes to the journal. Use this option to remount
1852 option was previously specified in order to restore normal behavior.
1854 .BR errors= { continue | remount-ro | panic }
1855 Define the behavior when an error is encountered.
1856 (Either ignore errors and just mark the filesystem erroneous and continue,
1857 or remount the filesystem read-only, or panic and halt the system.)
1859 .BR noquota | quota | usrquota | grpquota
1860 These options are accepted but ignored.
1862 .SS "Mount options for msdos"
1863 See mount options for fat.
1866 filesystem detects an inconsistency, it reports an error and sets the file
1867 system read-only. The filesystem can be made writable again by remounting
1870 .SS "Mount options for ncpfs"
1872 .IR nfs ", the " ncpfs
1873 implementation expects a binary argument (a
1874 .IR "struct ncp_mount_data" )
1875 to the mount system call. This argument is constructed by
1877 and the current version of
1879 (2.12) does not know anything about ncpfs.
1881 .SS "Mount options for ntfs"
1884 Character set to use when returning file names.
1885 Unlike VFAT, NTFS suppresses names that contain
1886 nonconvertible characters. Deprecated.
1889 New name for the option earlier called
1893 Use UTF-8 for converting file names.
1895 .BR uni_xlate= { 0 | 1 | 2 }
1896 For 0 (or `no' or `false'), do not use escape sequences
1897 for unknown Unicode characters.
1898 For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1899 starting with ":". Here 2 give a little-endian encoding
1900 and 1 a byteswapped bigendian encoding.
1903 If enabled (posix=1), the filesystem distinguishes between
1904 upper and lower case. The 8.3 alias names are presented as
1905 hard links instead of being suppressed. This option is obsolete.
1907 \fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
1908 Set the file permission on the filesystem.
1909 The umask value is given in octal.
1910 By default, the files are owned by root and not readable by somebody else.
1912 .SS "Mount options for overlay"
1913 Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
1916 An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
1917 a \fBlower\fR filesystem. When a name exists in both filesystems, the object
1918 in the upper filesystem is visible while the object in the lower filesystem is
1919 either hidden or, in the case of directories, merged with the upper object.
1921 The lower filesystem can be any filesystem supported by Linux and does not need
1922 to be writable. The lower filesystem can even be another overlayfs. The upper
1923 filesystem will normally be writable and if it is it must support the creation
1924 of trusted.* extended attributes, and must provide a valid d_type in readdir
1925 responses, so NFS is not suitable.
1927 A read-only overlay of two read-only filesystems may use any filesystem type.
1928 The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
1934 .B "mount \-t overlay overlay \e"
1935 .B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
1941 .BI lowerdir= directory
1942 Any filesystem, does not need to be on a writable filesystem.
1944 .BI upperdir= directory
1945 The upperdir is normally on a writable filesystem.
1947 .BI workdir= directory
1948 The workdir needs to be an empty directory on the same filesystem as upperdir.
1950 .SS "Mount options for reiserfs"
1951 Reiserfs is a journaling filesystem.
1954 Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
1955 using the 3.6 format for newly created objects. This filesystem will no
1956 longer be compatible with reiserfs 3.5 tools.
1958 .BR hash= { rupasov | tea | r5 | detect }
1959 Choose which hash function reiserfs will use to find files within directories.
1963 A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
1964 mapping lexicographically close file names to close hash values.
1965 This option should not be used, as it causes a high probability of hash
1969 A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1970 It uses hash permuting bits in the name. It gets high randomness
1971 and, therefore, low probability of hash collisions at some CPU cost.
1972 This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
1975 A modified version of the rupasov hash. It is used by default and is
1976 the best choice unless the filesystem has huge directories and
1977 unusual file-name patterns.
1982 to detect which hash function is in use by examining
1983 the filesystem being mounted, and to write this information into
1984 the reiserfs superblock. This is only useful on the first mount of
1985 an old format filesystem.
1988 .B hashed_relocation
1989 Tunes the block allocator. This may provide performance improvements
1992 .B no_unhashed_relocation
1993 Tunes the block allocator. This may provide performance improvements
1997 Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
1998 This may provide performance improvements in some situations.
2001 Disable journaling. This will provide slight performance improvements in
2002 some situations at the cost of losing reiserfs's fast recovery from crashes.
2003 Even with this option turned on, reiserfs still performs all journaling
2004 operations, save for actual writes into its journaling area. Implementation
2007 is a work in progress.
2010 By default, reiserfs stores small files and `file tails' directly into its
2011 tree. This confuses some utilities such as
2013 This option is used to disable packing of files into the tree.
2016 Replay the transactions which are in the journal, but do not actually
2017 mount the filesystem. Mainly used by
2021 A remount option which permits online expansion of reiserfs partitions.
2022 Instructs reiserfs to assume that the device has
2025 This option is designed for use with devices which are under logical
2026 volume management (LVM).
2029 utility which can be obtained from
2030 .IR ftp://ftp.namesys.com/pub/reiserfsprogs .
2033 Enable Extended User Attributes. See the
2038 Enable POSIX Access Control Lists. See the
2042 .BR barrier=none " / " barrier=flush "
2043 This disables / enables the use of write barriers in the journaling code.
2044 barrier=none disables, barrier=flush enables (default). This also requires an
2045 IO stack which can support barriers, and if reiserfs gets an error on a barrier
2046 write, it will disable barriers again with a warning. Write barriers enforce
2047 proper on-disk ordering of journal commits, making volatile disk write caches
2048 safe to use, at some performance penalty. If your disks are battery-backed in
2049 one way or another, disabling barriers may safely improve performance.
2051 .SS "Mount options for ubifs"
2052 UBIFS is a flash filesystem which works on top of UBI volumes. Note that
2053 \fBatime\fR is not supported and is always turned off.
2055 The device name may be specified as
2083 separator may be used instead of
2086 The following mount options are available:
2089 Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2090 system. Bulk-Read is an internal optimization. Some flashes may read faster if
2091 the data are read at one go, rather than at several read requests. For
2092 example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2095 Do not bulk-read. This is the default.
2098 Check data CRC-32 checksums. This is the default.
2100 .BR no_chk_data_crc .
2101 Do not check data CRC-32 checksums. With this option, the filesystem does not
2102 check CRC-32 checksum for data, but it does check it for the internal indexing
2103 information. This option only affects reading, not writing. CRC-32 is always
2104 calculated when writing the data.
2106 .BR compr= { none | lzo | zlib }
2107 Select the default compressor which is used when new files are written. It is
2108 still possible to read compressed files if mounted with the
2112 .SS "Mount options for udf"
2113 UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
2114 Storage Technology Association, and is often used for DVD-ROM, frequently
2115 in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
2116 perfectly usable by itself on disk drives, flash drives and other block devices.
2121 Make all files in the filesystem belong to the given user.
2122 uid=forget can be specified independently of (or usually in
2123 addition to) uid=<user> and results in UDF
2124 not storing uids to the media. In fact the recorded uid
2125 is the 32-bit overflow uid -1 as defined by the UDF standard.
2126 The value is given as either <user> which is a valid user name or the corresponding
2127 decimal user id, or the special string "forget".
2130 Make all files in the filesystem belong to the given group.
2131 gid=forget can be specified independently of (or usually in
2132 addition to) gid=<group> and results in UDF
2133 not storing gids to the media. In fact the recorded gid
2134 is the 32-bit overflow gid -1 as defined by the UDF standard.
2135 The value is given as either <group> which is a valid group name or the corresponding
2136 decimal group id, or the special string "forget".
2139 Mask out the given permissions from all inodes read from the filesystem.
2140 The value is given in octal.
2143 If mode= is set the permissions of all non-directory inodes read from the
2144 filesystem will be set to the given mode. The value is given in octal.
2147 If dmode= is set the permissions of all directory inodes read from the
2148 filesystem will be set to the given dmode. The value is given in octal.
2151 Set the block size. Default value prior to kernel version 2.6.30 was
2152 2048. Since 2.6.30 and prior to 4.11 it was logical device block size with
2153 fallback to 2048. Since 4.11 it is logical block size with fallback to
2154 any valid block size between logical device block size and 4096.
2156 For other details see the \fBmkudffs\fP(8) 2.0+ manpage, sections
2157 \fBCOMPATIBILITY\fP and \fBBLOCK SIZE\fP.
2160 Show otherwise hidden files.
2163 Show deleted files in lists.
2166 Embed data in the inode. (default)
2169 Don't embed data in the inode.
2172 Use short UDF address descriptors.
2175 Use long UDF address descriptors. (default)
2178 Unset strict conformance.
2181 Set the NLS character set. This requires kernel compiled with CONFIG_UDF_NLS option.
2184 Set the UTF-8 character set.
2185 .SS Mount options for debugging and disaster recovery
2188 Ignore the Volume Recognition Sequence and attempt to mount anyway.
2191 Select the session number for multi-session recorded optical media. (default= last session)
2194 Override standard anchor location. (default= 256)
2197 Set the last block of the filesystem.
2198 .SS Unused historical mount options that may be encountered and should be removed
2201 Ignored, use uid=<user> instead.
2204 Ignored, use gid=<group> instead.
2207 Unimplemented and ignored.
2210 Unimplemented and ignored.
2213 Unimplemented and ignored.
2216 Unimplemented and ignored.
2218 .SS "Mount options for ufs"
2221 UFS is a filesystem widely used in different operating systems.
2222 The problem are differences among implementations. Features of some
2223 implementations are undocumented, so its hard to recognize the
2224 type of ufs automatically.
2225 That's why the user must specify the type of ufs by mount option.
2226 Possible values are:
2230 Old format of ufs, this is the default, read only.
2231 (Don't forget to give the \-r option.)
2234 For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
2237 Used in FreeBSD 5.x supported as read-write.
2243 For filesystems created by SunOS or Solaris on Sparc.
2246 For filesystems created by Solaris on x86.
2249 For filesystems created by HP-UX, read-only.
2252 For filesystems created by NeXTStep (on NeXT station) (currently read only).
2255 For NextStep CDROMs (block_size == 2048), read-only.
2258 For filesystems created by OpenStep (currently read only).
2259 The same filesystem type is also used by Mac OS X.
2264 Set behavior on error:
2268 If an error is encountered, cause a kernel panic.
2270 .RB [ lock | umount | repair ]
2271 These mount options don't do anything at present;
2272 when an error is encountered only a console message is printed.
2275 .SS "Mount options for umsdos"
2276 See mount options for msdos.
2279 option is explicitly killed by
2282 .SS "Mount options for vfat"
2283 First of all, the mount options for
2288 option is explicitly killed by
2290 Furthermore, there are
2293 Translate unhandled Unicode characters to special escaped sequences.
2294 This lets you backup and restore filenames that are created with any
2295 Unicode characters. Without this option, a '?' is used when no
2296 translation is possible. The escape character is ':' because it is
2297 otherwise invalid on the vfat filesystem. The escape sequence
2298 that gets used, where u is the Unicode character,
2299 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2302 Allow two files with names that only differ in case.
2303 This option is obsolete.
2306 First try to make a short name without sequence number,
2308 .IR name\s+3~\s0num.ext .
2311 UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2312 console. It can be enabled for the filesystem with this option or disabled
2313 with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2317 Defines the behavior for creation and display of filenames which fit into
2318 8.3 characters. If a long name for a file exists, it will always be the
2319 preferred one for display. There are four \fImode\fRs:
2323 Force the short name to lower case upon display; store a long name when
2324 the short name is not all upper case.
2327 Force the short name to upper case upon display; store a long name when
2328 the short name is not all upper case.
2331 Display the short name as is; store a long name when the short name is
2332 not all lower case or all upper case.
2335 Display the short name as is; store a long name when the short name is not
2336 all upper case. This mode is the default since Linux 2.6.32.
2339 .SS "Mount options for usbfs"
2341 \fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
2342 Set the owner and group and mode of the device files in the usbfs filesystem
2343 (default: uid=gid=0, mode=0644). The mode is given in octal.
2345 \fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
2346 Set the owner and group and mode of the bus directories in the usbfs
2347 filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2349 \fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
2350 Set the owner and group and mode of the file
2352 (default: uid=gid=0, mode=0444). The mode is given in octal.
2354 .SH "THE LOOP DEVICE"
2355 One further possible type is a mount via the loop device. For example,
2359 .B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
2362 will set up the loop device
2364 to correspond to the file
2366 and then mount this device on
2369 If no explicit loop device is mentioned
2370 (but just an option `\fB\-o loop\fP' is given), then
2372 will try to find some unused loop device and use that, for example
2375 .B "mount /tmp/disk.img /mnt \-o loop"
2380 creates a loop device from a regular file if a filesystem type is
2381 not specified or the filesystem is known for libblkid, for example:
2384 .B "mount /tmp/disk.img /mnt"
2386 .B "mount \-t ext4 /tmp/disk.img /mnt"
2389 This type of mount knows about three options, namely
2390 .BR loop ", " offset " and " sizelimit ,
2391 that are really options to
2393 (These options can be used in addition to those specific
2394 to the filesystem type.)
2396 Since Linux 2.6.25 auto-destruction of loop devices is supported,
2397 meaning that any loop device allocated by
2404 You can also free a loop device by hand, using
2405 .BR "losetup \-d " or " umount \-d" .
2407 Since util-linux v2.29 mount command re-uses the loop device rather than
2408 initialize a new device if the same backing file is already used for some loop
2409 device with the same offset and sizelimit. This is necessary to avoid
2410 a filesystem corruption.
2414 has the following return codes (the bits can be ORed):
2420 incorrect invocation or permissions
2423 system error (out of memory, cannot fork, no more loop devices)
2434 problems writing or locking /etc/mtab
2440 some mount succeeded
2442 The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2443 failed, some succeeded).
2445 .SH "EXTERNAL HELPERS"
2446 The syntax of external mount helpers is:
2449 .BI /sbin/mount. suffix
2457 .IR type \fB. subtype ]
2460 where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvoN\fR options have
2461 the same meaning as the normal mount options. The \fB\-t\fR option is used for
2462 filesystems with subtypes support (for example
2463 .BR "/sbin/mount.fuse \-t fuse.sshfs" ).
2465 The command \fBmount\fR does not pass the mount options
2482 to the mount.<suffix> helpers. All other options are used in a
2483 comma-separated list as argument to the \fB\-o\fR option.
2486 See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
2492 libmount private runtime directory
2495 table of mounted filesystems or symlink to /proc/mounts
2497 .I /etc/mtab\s+3~\s0
2498 lock file (unused on systems with mtab symlink)
2501 temporary file (unused on systems with mtab symlink)
2504 a list of filesystem types to try
2506 .IP LIBMOUNT_FSTAB=<path>
2507 overrides the default location of the fstab file (ignored for suid)
2508 .IP LIBMOUNT_MTAB=<path>
2509 overrides the default location of the mtab file (ignored for suid)
2510 .IP LIBMOUNT_DEBUG=all
2511 enables libmount debug output
2512 .IP LIBBLKID_DEBUG=all
2513 enables libblkid debug output
2514 .IP LOOPDEV_DEBUG=all
2515 enables loop device setup debug output
2535 It is possible for a corrupted filesystem to cause a crash.
2537 Some Linux filesystems don't support
2538 .BR "\-o sync " nor " \-o dirsync"
2539 (the ext2, ext3, ext4, fat and vfat filesystems
2541 support synchronous updates (a la BSD) when mounted with the
2547 may not be able to change mount parameters (all
2548 .IR ext2fs -specific
2551 are changeable with a remount, for example, but you can't change
2558 It is possible that the files
2562 don't match on systems with a regular mtab file. The first file is based only on
2563 the mount command options, but the content of the second file also depends on
2564 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2565 the mount command may report unreliable information about an NFS mount point
2566 and the /proc/mounts file usually contains more reliable information.) This is
2567 another reason to replace the mtab file with a symlink to the
2571 Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
2575 families of functions) may lead to inconsistent results due to the lack of
2576 a consistency check in the kernel even if noac is used.
2584 options used may fail when using older kernels if the
2586 command can't confirm that the size of the block device has been configured
2587 as requested. This situation can be worked around by using
2590 command manually before calling
2592 with the configured loop device.
2596 command existed in Version 5 AT&T UNIX.
2599 Karel Zak <kzak@redhat.com>
2602 The mount command is part of the util-linux package and is available from
2603 https://www.kernel.org/pub/linux/utils/util-linux/.