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 names of disk partitions are unstable; hardware reconfiguration,
153 adding or removing a device can cause changes in names. This is the reason why it's
154 strongly recommended to use filesystem or partition identifiers like UUID or
157 The command \fBlsblk \-\-fs\fR provides an 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
176 has no advantage over tags.
182 uses UUIDs as strings. The UUIDs from the command line or from
184 are not converted to internal binary representation. The string representation
185 of the UUID should be based on lower case characters.
189 filesystem is not associated with a special device, and when
190 mounting it, an arbitrary keyword, such as
192 can be used instead of a device specification.
193 (The customary choice
195 is less fortunate: the error message `none already mounted' from
199 .SS The files /etc/fstab, /etc/mtab and /proc/mounts
204 may contain lines describing what devices are usually
205 mounted where, using which options. The default location of the
207 file can be overridden with the
208 .BI \-\-fstab " path"
209 command-line option (see below for more details).
221 (usually given in a bootscript) causes all filesystems mentioned in
223 (of the proper type and/or having or not having the proper options)
224 to be mounted as indicated, except for those whose line contains the
228 option will make \fBmount\fR fork, so that the
229 filesystems are mounted simultaneously.
231 When mounting a filesystem mentioned in
235 it suffices to specify on the command line only the device, or only the mount point.
241 traditionally maintained a list of currently mounted filesystems in the file
243 The support for regular classic
245 is completely disabled in compile time by default, because on current Linux
246 systems it is better to make it a symlink to
248 instead. The regular mtab file maintained in userspace cannot reliably
249 work with namespaces, containers and other advanced Linux features.
250 If the regular mtab support is enabled than it's possible to
251 use the file as well as the symlink.
253 If no arguments are given to
255 the list of mounted filesystems is printed.
257 If you want to override mount options from
259 you have to use the \fB\-o\fR option:
262 .BI mount " device" \fR| "dir " \-o " options"
265 and then the mount options from the command line will be appended to
266 the list of options from
268 This default behaviour is possible to change by command line
269 option \fB\-\-options\-mode\fR.
270 The usual behavior is that the last option wins if there are conflicting
275 program does not read the
279 (or LABEL, UUID, PARTUUID or PARTLABEL) and
281 are specified. For example, to mount device
282 .BR foo " at " /dir :
285 .B "mount /dev/foo /dir"
288 This default behaviour is possible to change by command line option
289 \fB\-\-options\-source\-force\fR to always read configuration from
297 .SS Non-superuser mounts
298 Normally, only the superuser can mount filesystems.
303 option on a line, anybody can mount the corresponding filesystem.
308 .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
311 any user can mount the iso9660 filesystem found on an inserted CDROM
317 Note that \fBmount\fR is very strict about non-root users and all paths
318 specified on command line are verified before
320 is parsed or a helper
321 program is executed. It's strongly recommended to use a valid mountpoint to
322 specify filesystem, otherwise \fBmount\fR may fail. For example it's bad idea
323 to use NFS or CIFS source on command line.
325 Since version 2.35 \fBmount\fR command does not exit when user permissions are
326 inadequate by internal libmount security rules. It drops suid permissions
327 and continue as regular non-root user. It allows to support use-cases where
328 root permissions are not necessary (e.g., fuse filesystems, user namespaces,
331 For more details, see
333 Only the user that mounted a filesystem can unmount it again.
334 If any user should be able to unmount it, then use
343 option is similar to the
345 option, with the restriction that the user must be the owner
346 of the special file. This may be useful e.g.\& for
348 if a login script makes the console user owner of this device.
351 option is similar, with the restriction that the user must be
352 member of the group of the special file.
354 .SS Bind mount operation
355 Remount part of the file hierarchy somewhere else. The call is:
374 After this call the same contents are accessible in two places.
376 It is important to understand that "bind" does not to create any second-class
377 or special node in the kernel VFS. The "bind" is just another operation to
378 attach a filesystem. There is nowhere stored information that the filesystem
379 has been attached by "bind" operation. The \fIolddir\fR and \fInewdir\fR are
380 independent and the \fIolddir\fR may be umounted.
382 One can also remount a single file (on a single file). It's also
383 possible to use the bind mount to create a mountpoint from a regular
384 directory, for example:
388 .B mount \-\-bind foo foo
391 The bind mount call attaches only (part of) a single filesystem, not possible
392 submounts. The entire file hierarchy including submounts is attached
393 a second place by using:
401 Note that the filesystem mount options maintained by kernel will remain the same as those
402 on the original mount point. The userspace mount options (e.g., _netdev) will not be copied
405 and it's necessary explicitly specify the options on mount command line.
408 since v2.27 allows to change the mount options by passing the
409 relevant options along with
415 .B mount \-o bind,ro foo foo
418 This feature is not supported by the Linux kernel; it is implemented in userspace
419 by an additional \fBmount\fR(2) remounting system call.
420 This solution is not atomic.
422 The alternative (classic) way to create a read-only bind mount is to use the remount
423 operation, for example:
430 .B mount \-o remount,bind,ro
434 Note that a read-only bind will create a read-only mountpoint (VFS entry),
435 but the original filesystem superblock will still be writable, meaning that the
437 will be writable, but the
441 It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
442 relatime VFS entry flags by "remount,bind" operation. The another (for example
443 filesystem specific flags) are silently ignored. It's impossible to change mount
444 options recursively (for example with \fB\-o rbind,ro\fR).
447 since v2.31 ignores the \fBbind\fR flag from
451 (if "\-o remount" specified on command line). This is necessary to fully control
452 mount options on remount by command line. In the previous versions the bind
453 flag has been always applied and it was impossible to re-define mount options
454 without interaction with the bind semantic. This
456 behavior does not affect situations when "remount,bind" is specified in the
460 .SS The move operation
463 to another place (atomically). The call is:
471 This will cause the contents which previously appeared under
473 to now be accessible under
475 The physical location of the files is not changed.
478 has to be a mountpoint.
480 Note also that moving a mount residing under a shared mount is invalid and
482 .B findmnt \-o TARGET,PROPAGATION
483 to see the current propagation flags.
485 .SS Shared subtree operations
486 Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
487 private, slave or unbindable. A shared mount provides the ability to create mirrors
488 of that mount such that mounts and unmounts within any of the mirrors propagate
489 to the other mirror. A slave mount receives propagation from its master, but
490 not vice versa. A private mount carries no propagation abilities. An
491 unbindable mount is a private mount which cannot be cloned through a bind
492 operation. The detailed semantics are documented in
493 .I Documentation/filesystems/sharedsubtree.txt
494 file in the kernel source tree.
496 Supported operations are:
500 .BI "mount \-\-make\-shared " mountpoint
501 .BI "mount \-\-make\-slave " mountpoint
502 .BI "mount \-\-make\-private " mountpoint
503 .BI "mount \-\-make\-unbindable " mountpoint
507 The following commands allow one to recursively change the type of all the
508 mounts under a given mountpoint.
512 .BI "mount \-\-make\-rshared " mountpoint
513 .BI "mount \-\-make\-rslave " mountpoint
514 .BI "mount \-\-make\-rprivate " mountpoint
515 .BI "mount \-\-make\-runbindable " mountpoint
522 when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
523 specified on the command line.
525 Note that the Linux kernel does not allow to change multiple propagation flags
528 system call, and the flags cannot be mixed with other mount options and operations.
530 Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
531 (topology) changes by one mount(8) call and do it also together with other
532 mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
533 by additional \fBmount\fR(2) system calls when the preceding mount operations
534 were successful. Note that this use case is not atomic. It is possible to
535 specify the propagation flags in
551 .B mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo
559 .B mount /dev/sda1 /foo
560 .B mount \-\-make\-private /foo
561 .B mount \-\-make\-unbindable /foo
565 .SH COMMAND-LINE OPTIONS
566 The full set of mount options used by an invocation of
568 is determined by first extracting the
569 mount options for the filesystem from the
571 table, then applying any options specified by the
573 argument, and finally applying a
575 option, when present.
577 The command \fBmount\fR does not pass all command-line options to the
578 \fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
579 and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
581 Command-line options available for the
586 Mount all filesystems (of the given types) mentioned in
588 (except for those whose line contains the
590 keyword). The filesystems are mounted following their order in
592 The mount command compares filesystem source, target (and fs root for bind
593 mount or btrfs) to detect already mounted filesystems. The kernel table with
594 already mounted filesystems is cached during \fBmount \-\-all\fR. It means
597 entries will be mounted.
599 The option \fB\-\-all\fR is possible to use for remount operation too. In this
600 case all filters (\fB\-t\fR and \fB\-O\fR) are applied to the table of already
603 Since version 2.35 is possible to use the command line option \fB\-o\fR to
604 alter mount options from
606 (see also \fB\-\-options\-mode\fR).
608 Note that it is a bad practice to use \fBmount \-a\fR for
610 checking. The recommended solution is \fBfindmnt \-\-verify\fR.
612 .BR \-B , " \-\-bind"
613 Remount a subtree somewhere else (so that its contents are available
614 in both places). See above, under \fBBind mounts\fR.
616 .BR \-c , " \-\-no\-canonicalize"
617 Don't canonicalize paths. The mount command canonicalizes all paths
618 (from command line or
620 by default. This option can be used
623 flag for already canonicalized absolute paths. The option is designed for mount
624 helpers which call \fBmount \-i\fR. It is strongly recommended to not use this
625 command-line option for normal mount operations.
627 Note that \fBmount\fR(8) does not pass this option to the
628 \fB/sbin/mount.\fItype\fR helpers.
630 .BR \-F , " \-\-fork"
631 (Used in conjunction with
633 Fork off a new incarnation of \fBmount\fR for each device.
634 This will do the mounts on different devices or different NFS servers
636 This has the advantage that it is faster; also NFS timeouts go in
637 parallel. A disadvantage is that the mounts are done in undefined order.
638 Thus, you cannot use this option if you want to mount both
642 .IP "\fB\-f, \-\-fake\fP"
643 Causes everything to be done except for the actual system call; if it's not
644 obvious, this ``fakes'' mounting the filesystem. This option is useful in
647 flag to determine what the
649 command is trying to do. It can also be used to add entries for devices
650 that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
651 checks for an existing record in
653 and fails when the record already
654 exists (with a regular non-fake mount, this check is done by the kernel).
655 .IP "\fB\-i, \-\-internal\-only\fP"
656 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
658 .BR \-L , " \-\-label " \fIlabel
659 Mount the partition that has the specified
662 .BR \-l , " \-\-show\-labels"
663 Add the labels in the mount output. \fBmount\fR must have
664 permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
665 One can set such a label for ext2, ext3 or ext4 using the
667 utility, or for XFS using
669 or for reiserfs using
670 .BR reiserfstune (8).
672 .BR \-M , " \-\-move"
673 Move a subtree to some other place. See above, the subsection
674 \fBThe move operation\fR.
676 .BR \-n , " \-\-no\-mtab"
677 Mount without writing in
679 This is necessary for example when
681 is on a read-only filesystem.
683 .BR \-N , " \-\-namespace " \fIns
684 Perform mount in the mount namespace specified by \fIns\fR.
685 \fIns\fR is either PID of process running in that namespace
686 or special file representing that namespace.
689 switches to the mount namespace when it reads
697 system call, otherwise it runs in the original mount namespace.
698 It means that the target namespace does not have
699 to contain any libraries or another requirements necessary to execute
703 See \fBmount_namespaces\fR(7) for more information.
705 .BR \-O , " \-\-test\-opts " \fIopts
706 Limit the set of filesystems to which the
708 option applies. In this regard it is like the
714 For example, the command:
718 .B "mount \-a \-O no_netdev"
721 mounts all filesystems except those which have the option
723 specified in the options field in the
729 in that each option is matched exactly; a leading
731 at the beginning of one option does not negate the rest.
737 options are cumulative in effect; that is, the command
740 .B "mount \-a \-t ext2 \-O _netdev"
743 mounts all ext2 filesystems with the _netdev option, not all filesystems
744 that are either ext2 or have the _netdev option specified.
747 .BR \-o , " \-\-options " \fIopts
748 Use the specified mount options. The \fIopts\fR argument is
749 a comma-separated list. For example:
753 .B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
757 For more details, see the
758 .B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
760 .B FILESYSTEM-SPECIFIC MOUNT OPTIONS
765 .BR "\-\-options\-mode " \fImode
766 Controls how to combine options from
768 with options from command line.
769 \fImode\fR can be one of
770 .BR ignore ", " append ", " prepend " or " replace .
771 For example \fBappend\fR means that options from
773 are appended to options from command line.
774 Default value is \fBprepend\fR -- it means command line options are evaluated after
777 Note that the last option wins if there are conflicting ones.
780 .BR "\-\-options\-source " \fIsource
781 Source of default options.
782 \fIsource\fR is comma separated list of
783 .BR fstab ", " mtab " and " disable .
784 \fBdisable\fR disables
785 .BR fstab " and " mtab
786 and disables \fB\-\-options\-source\-force\fR.
787 Default value is \fBfstab,mtab\fR.
790 .B \-\-options\-source\-force
793 even if both \fIdevice\fR and \fIdir\fR are specified.
796 .BR \-R , " \-\-rbind"
797 Remount a subtree and all possible submounts somewhere else (so that its
798 contents are available in both places). See above, the subsection
801 .BR \-r , " \-\-read\-only"
802 Mount the filesystem read-only. A synonym is
805 Note that, depending on the filesystem type, state and kernel behavior, the
806 system may still write to the device. For example, ext3 and ext4 will replay the
807 journal if the filesystem is dirty. To prevent this kind of write access, you
808 may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
809 options or set the block device itself to read-only mode, see the
814 Tolerate sloppy mount options rather than failing. This will ignore mount
815 options not supported by a filesystem type. Not all filesystems support this
816 option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
818 .BI \-\-source " device"
819 If only one argument for the mount command is given then the argument might be
820 interpreted as target (mountpoint) or source (device). This option allows to
821 explicitly define that the argument is the mount source.
823 .BI \-\-target " directory"
824 If only one argument for the mount command is given then the argument might be
825 interpreted as target (mountpoint) or source (device). This option allows to
826 explicitly define that the argument is the mount target.
828 .BI \-\-target\-prefix " directory"
829 Prepend specified directory to all mount targets. This option allows to follow
831 but mount operations is done on another place, for example:
835 .B "mount \-\-all \-\-target\-prefix /chroot \-o X\-mount.mkdir
838 mounts all from system
842 all missing muontpoint are created
843 (due to X-mount.mkdir). See also \fB\-\-fstab\fP to use an alternative
847 .BR \-T , " \-\-fstab " \fIpath
848 Specifies an alternative
850 file. If \fIpath\fP is a directory then the files
851 in the directory are sorted by
853 files that start with "."\& or without an
855 extension are ignored. The option
856 can be specified more than once. This option is mostly designed for initramfs
857 or chroot scripts where additional configuration is specified beyond standard
858 system configuration.
860 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
861 \fB/sbin/mount.\fItype\fR helpers, meaning that the alternative
864 invisible for the helpers. This is no problem for normal mounts, but user
865 (non-root) mounts always require
867 to verify the user's rights.
869 .BR \-t , " \-\-types " \fIfstype
870 The argument following the
872 is used to indicate the filesystem type. The filesystem types which are
873 currently supported depend on the running kernel. See
876 .I /lib/modules/$(uname \-r)/kernel/fs
877 for a complete list of the filesystems. The most common are ext2, ext3, ext4,
878 xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
884 support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
885 example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
886 any prefix to the mount source (for example 'sshfs#example.com' is
891 option is given, or if the
893 type is specified, mount will try to guess the desired type.
894 Mount uses the blkid library for guessing the filesystem
895 type; if that does not turn up anything that looks familiar,
896 mount will try to read the file
897 .IR /etc/filesystems ,
898 or, if that does not exist,
899 .IR /proc/filesystems .
900 All of the filesystem types listed there will be tried,
901 except for those that are labeled "nodev" (e.g.\&
908 ends in a line with a single *, mount will read
910 afterwards. While trying, all filesystem types will be
911 mounted with the mount option \fBsilent\fR.
915 type may be useful for user-mounted floppies.
918 can be useful to change the probe order (e.g., to try vfat before msdos
919 or ext3 before ext2) or if you use a kernel module autoloader.
921 More than one type may be specified in a comma-separated
926 entry. The list of filesystem types for option
930 to specify the filesystem types on which no action should be taken.
933 has no effect when specified in an
939 can be meaningful with the
941 option. For example, the command
945 .B "mount \-a \-t nomsdos,smbfs"
948 mounts all filesystems except those of type
953 For most types all the
955 program has to do is issue a simple
957 system call, and no detailed knowledge of the filesystem type is required.
958 For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
959 necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
960 have a separate mount program. In order to make it possible to
961 treat all types in a uniform way, \fBmount\fR will execute the program
962 .BI /sbin/mount. type
963 (if that exists) when called with type
965 Since different versions of the
967 program have different calling conventions,
969 may have to be a shell script that sets up the desired call.
972 .BR \-U , " \-\-uuid " \fIuuid
973 Mount the partition that has the specified
976 .BR \-v , " \-\-verbose"
979 .BR \-w , " \-\-rw" , " \-\-read\-write"
980 Mount the filesystem read/write. The read-write is kernel default and
982 default is to try read-only if the previous mount syscall with read-write flags
983 on write-protected devices of filesystems failed.
988 Note that specify \fB\-w\fR on command line forces \fBmount\fR command to never
989 try read-only mount on write-protected devices or already mounted read-only
992 .BR \-V , " \-\-version"
993 Display version information and exit.
995 .BR \-h , " \-\-help"
996 Display help text and exit.
998 .SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
999 Some of these options are only useful when they appear in the
1003 Some of these options could be enabled or disabled by default
1004 in the system kernel. To check the current setting see the options
1007 Note that filesystems also have per-filesystem
1008 specific default mount options (see for example \fBtune2fs \-l\fP
1009 output for extN filesystems).
1011 The following options apply to any filesystem that is being
1012 mounted (but not every filesystem actually honors them \(en e.g.\&, the
1014 option today has an effect only for ext2, ext3, ext4, fat, vfat, ufs and xfs):
1018 All I/O to the filesystem should be done asynchronously. (See also the
1023 Do not use the \fBnoatime\fR feature, so the inode access time is controlled
1024 by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
1029 Do not update inode access times on this filesystem (e.g.\& for faster
1030 access on the news spool to speed up news servers). This works for all
1031 inode types (directories too), so it implies \fB\%nodiratime\fR.
1034 Can be mounted with the
1039 Can only be mounted explicitly (i.e., the
1041 option will not cause the filesystem to be mounted).
1044 .BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
1048 option is useful when mounting filesystems that do not support
1049 extended attributes, such as a floppy or hard disk formatted with VFAT, or
1050 systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
1052 disk from a non-SELinux workstation. You can also use
1054 on filesystems you do not trust, such as a floppy. It also helps in compatibility with
1055 xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
1056 xattrs are supported, you can save time not having to label every file by
1057 assigning the entire disk one security context.
1059 A commonly used option for removable media is
1060 .BR \%context="system_u:object_r:removable_t" .
1062 Two other options are
1066 both of which are mutually exclusive of the context option. This means you
1067 can use fscontext and defcontext with each other, but neither can be used with
1072 option works for all filesystems, regardless of their xattr
1073 support. The fscontext option sets the overarching filesystem label to a
1074 specific security context. This filesystem label is separate from the
1075 individual labels on the files. It represents the entire filesystem for
1076 certain kinds of permission checks, such as during mount or file creation.
1077 Individual file labels are still obtained from the xattrs on the files
1078 themselves. The context option actually sets the aggregate context that
1079 fscontext provides, in addition to supplying the same label for individual
1082 You can set the default security context for unlabeled files using
1084 option. This overrides the value set for unlabeled files in the policy and requires a
1085 filesystem that supports xattr labeling.
1089 option allows you to explicitly label the root inode of a FS being mounted
1090 before that FS or inode becomes visible to userspace. This was found to be
1091 useful for things like stateless linux.
1093 Note that the kernel rejects any remount request that includes the context
1094 option, \fBeven\fP when unchanged from the current context.
1096 .BR "Warning: the \fIcontext\fP value might contain commas" ,
1097 in which case the value has to be properly quoted, otherwise
1099 will interpret the comma as a separator between mount options. Don't forget that
1100 the shell strips off quotes and thus
1101 .BR "double quoting is required" .
1107 .B mount \-t tmpfs none /mnt \-o \e
1108 .B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
1112 For more details, see
1118 Use the default options:
1119 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
1121 Note that the real set of all default mount options depends on kernel
1122 and filesystem type. See the beginning of this section for more details.
1125 Interpret character or block special devices on the filesystem.
1128 Do not interpret character or block special devices on the file
1132 Update directory inode access times on this filesystem. This is the default.
1133 (This option is ignored when \fBnoatime\fR is set.)
1136 Do not update directory inode access times on this filesystem.
1137 (This option is implied when \fBnoatime\fR is set.)
1140 All directory updates within the filesystem should be done synchronously.
1141 This affects the following system calls: creat, link, unlink, symlink,
1142 mkdir, rmdir, mknod and rename.
1145 Permit execution of binaries.
1148 Do not permit direct execution of any binaries on the mounted filesystem.
1151 Allow an ordinary user to mount the filesystem if one
1152 of that user's groups matches the group of the device.
1153 This option implies the options
1154 .BR nosuid " and " nodev
1155 (unless overridden by subsequent options, as in the option line
1156 .BR group,dev,suid ).
1159 Every time the inode is modified, the i_version field will be incremented.
1162 Do not increment the i_version inode field.
1165 Allow mandatory locks on this filesystem. See
1169 Do not allow mandatory locks on this filesystem.
1172 The filesystem resides on a device that requires network access
1173 (used to prevent the system from attempting to mount these filesystems
1174 until the network has been enabled on the system).
1177 Do not report errors for this device if it does not exist.
1180 Update inode access times relative to modify or change time. Access
1181 time is only updated if the previous access time was earlier than the
1182 current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
1183 break \fBmutt\fR or other applications that need to know if a file has been
1184 read since the last time it was modified.)
1186 Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1189 was specified), and the
1191 option is required to obtain traditional semantics. In addition, since Linux
1192 2.6.30, the file's last access time is always updated if it is more than 1
1198 feature. See also the
1203 Allows to explicitly request full atime updates. This makes it
1204 possible for the kernel to default to
1208 but still allow userspace to override it. For more details about the default
1209 system mount options see
1213 Use the kernel's default behavior for inode access time updates.
1216 Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1218 This mount option significantly reduces writes to the inode table for
1219 workloads that perform frequent random writes to preallocated files.
1221 The on-disk timestamps are updated only when:
1224 - the inode needs to be updated for some change unrelated to file timestamps
1226 - the application employs
1232 - an undeleted inode is evicted from memory
1234 - more than 24 hours have passed since the i-node was written to disk.
1239 Do not use the lazytime feature.
1242 Honor set-user-ID and set-group-ID bits or file capabilities when
1243 executing programs from this filesystem.
1246 Do not honor set-user-ID and set-group-ID bits or file capabilities when
1247 executing programs from this filesystem.
1250 Turn on the silent flag.
1253 Turn off the silent flag.
1256 Allow an ordinary user to mount the filesystem if that
1257 user is the owner of the device.
1258 This option implies the options
1259 .BR nosuid " and " nodev
1260 (unless overridden by subsequent options, as in the option line
1261 .BR owner,dev,suid ).
1264 Attempt to remount an already-mounted filesystem. This is commonly
1265 used to change the mount flags for a filesystem, especially to make a
1266 readonly filesystem writable. It does not change device or mount point.
1268 The remount operation together with the
1270 flag has special semantic. See above, the subsection \fBBind mounts\fR.
1272 The remount functionality follows the standard way the mount command works
1275 This means that \fBmount\fR does not read
1286 .B "mount \-o remount,rw /dev/foo /dir"
1289 After this call all old mount options are replaced and arbitrary stuff from
1293 is ignored, except the loop= option which is internally
1294 generated and maintained by the mount command.
1297 .B "mount \-o remount,rw /dir"
1300 After this call, mount reads
1302 and merges these options with
1303 the options from the command line (\fB\-o\fR).
1304 If no mountpoint is found in
1306 then a remount with unspecified source is
1309 mount(8) allows to use \fB\-\-all\fR to remount all already mounted filesystems
1310 which match a specified filter (\fB\-O\fR and \fB\-t\fR). For example:
1313 .B "mount \-\-all \-o remount,ro \-t vfat"
1316 remounts all already mounted vfat filesystems in read-only mode. The each of the
1317 filesystems is remounted by "mount \-o remount,ro /dir" semantic. It means the
1322 and merges these options with the options
1323 from the command line.
1326 Mount the filesystem read-only.
1329 Mount the filesystem read-write.
1332 All I/O to the filesystem should be done synchronously. In the case of
1333 media with a limited number of write cycles
1334 (e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
1337 Allow an ordinary user to mount the filesystem.
1338 The name of the mounting user is written to the
1340 file (or to the private
1343 on systems without a regular
1346 same user can unmount the filesystem again.
1347 This option implies the options
1348 .BR noexec ", " nosuid ", and " nodev
1349 (unless overridden by subsequent options, as in the option line
1350 .BR user,exec,dev,suid ).
1353 Forbid an ordinary user to mount the filesystem.
1354 This is the default; it does not imply any other options.
1357 Allow any user to mount and to unmount the filesystem, even
1358 when some other ordinary user mounted it.
1359 This option implies the options
1360 .BR noexec ", " nosuid ", and " nodev
1361 (unless overridden by subsequent options, as in the option line
1362 .BR users,exec,dev,suid ).
1365 All options prefixed with "X-" are interpreted as comments or as userspace
1366 application-specific options.
1367 These options are not stored in the user space (e.g.,
1370 nor sent to the mount.\fItype\fR helpers nor to the
1372 system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
1375 The same as \fBX-*\fR options, but stored permanently in the user space. It
1376 means the options are also available for umount or another operations. Note
1377 that maintain mount options in user space is tricky, because it's necessary use
1378 libmount based tools and there is no guarantee that the options will be always
1379 available (for example after a move mount operation or in unshared namespace).
1381 Note that before util-linux v2.30 the x-* options have not been maintained by
1382 libmount and stored in user space (functionality was the same as have X-* now),
1383 but due to growing number of use-cases (in initrd, systemd etc.) the
1384 functionality have been extended to keep existing
1386 configurations usable
1389 .BR X-mount.mkdir [ = \fImode\fR ]
1390 Allow to make a target directory (mountpoint) if it does not exit yet.
1391 The optional argument
1393 specifies the filesystem access mode used for
1395 in octal notation. The default mode is 0755. This functionality is supported
1396 only for root users or when mount executed without suid permissions. The option
1397 is also supported as x-mount.mkdir, this notation is deprecated since v2.30.
1399 .SH FILESYSTEM-SPECIFIC MOUNT OPTIONS
1400 You should consult the respective man page for the filesystem first.
1401 If you want to know what options the ext4 filesystem supports, then check the
1404 If that doesn't exist, you can also check the corresponding mount page like
1406 Note that you might have to install the respective userland tools.
1408 The following options apply only to certain filesystems.
1409 We sort them by filesystem. They all follow the
1413 What options are supported depends a bit on the running kernel.
1414 More info may be found in the kernel source subdirectory
1415 .IR Documentation/filesystems .
1417 .SS "Mount options for adfs"
1419 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1420 Set the owner and group of the files in the filesystem (default: uid=gid=0).
1422 \fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
1423 Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1424 respectively (default: 0700 and 0077, respectively).
1426 .IR /usr/src/linux/Documentation/filesystems/adfs.rst .
1428 .SS "Mount options for affs"
1430 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1431 Set the owner and group of the root of the filesystem (default: uid=gid=0,
1436 without specified value, the UID and GID of the current process are taken).
1438 \fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
1439 Set the owner and group of all files.
1442 Set the mode of all files to
1444 disregarding the original permissions.
1445 Add search permission to directories that have read permission.
1446 The value is given in octal.
1449 Do not allow any changes to the protection bits on the filesystem.
1452 Set UID and GID of the root of the filesystem to the UID and GID
1453 of the mount point upon the first sync or umount, and then
1454 clear this option. Strange...
1457 Print an informational message for each successful mount.
1460 Prefix used before volume name, when following a link.
1463 Prefix (of length at most 30) used before '/' when following a symbolic link.
1466 (Default: 2.) Number of unused blocks at the start of the device.
1469 Give explicitly the location of the root block.
1472 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1474 .BR grpquota | noquota | quota | usrquota
1475 These options are accepted but ignored.
1476 (However, quota utilities may react to such strings in
1479 .SS "Mount options for debugfs"
1480 The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1481 .IR /sys/kernel/debug .
1483 .\" present since 2.6.11
1484 As of kernel version 3.4, debugfs has the following options:
1486 .BI uid= n ", gid=" n
1487 Set the owner and group of the mountpoint.
1490 Sets the mode of the mountpoint.
1492 .SS "Mount options for devpts"
1493 The devpts filesystem is a pseudo filesystem, traditionally mounted on
1495 In order to acquire a pseudo terminal, a process opens
1497 the number of the pseudo terminal is then made available to the process
1498 and the pseudo terminal slave can be accessed as
1499 .IR /dev/pts/ <number>.
1501 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1502 This sets the owner or the group of newly created PTYs to
1503 the specified values. When nothing is specified, they will
1504 be set to the UID and GID of the creating process.
1505 For example, if there is a tty group with GID 5, then
1507 will cause newly created PTYs to belong to the tty group.
1510 Set the mode of newly created PTYs to the specified value.
1511 The default is 0600.
1516 makes "mesg y" the default on newly created PTYs.
1519 Create a private instance of devpts filesystem, such that
1520 indices of ptys allocated in this new instance are
1521 independent of indices created in other instances of devpts.
1523 All mounts of devpts without this
1525 option share the same set of pty indices (i.e., legacy mode).
1526 Each mount of devpts with the
1528 option has a private set of pty indices.
1530 This option is mainly used to support containers in the
1531 linux kernel. It is implemented in linux kernel versions
1532 starting with 2.6.29. Further, this mount option is valid
1533 only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1534 kernel configuration.
1536 To use this option effectively,
1538 must be a symbolic link to
1541 .I Documentation/filesystems/devpts.txt
1542 in the linux kernel source tree for details.
1546 Set the mode for the new
1548 device node in the devpts filesystem.
1550 With the support for multiple instances of devpts (see
1552 option above), each instance has a private
1554 node in the root of the devpts filesystem (typically
1555 .IR /dev/pts/ptmx ).
1557 For compatibility with older versions of the kernel, the
1558 default mode of the new
1562 specifies a more useful mode for the
1564 node and is highly recommended when the
1566 option is specified.
1568 This option is only implemented in linux kernel versions
1569 starting with 2.6.29. Further, this option is valid only if
1570 CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1573 .SS "Mount options for fat"
1576 is not a separate filesystem, but a common part of the
1583 .BR blocksize= { 512 | 1024 | 2048 }
1584 Set blocksize (default 512). This option is obsolete.
1586 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1587 Set the owner and group of all files.
1588 (Default: the UID and GID of the current process.)
1591 Set the umask (the bitmask of the permissions that are
1593 present). The default is the umask of the current process.
1594 The value is given in octal.
1597 Set the umask applied to directories only.
1598 The default is the umask of the current process.
1599 The value is given in octal.
1602 Set the umask applied to regular files only.
1603 The default is the umask of the current process.
1604 The value is given in octal.
1606 .BI allow_utime= value
1607 This option controls the permission check of mtime/atime.
1611 If current process is in group of file's group ID, you can change timestamp.
1614 Other users can change timestamp.
1616 The default is set from `dmask' option. (If the directory is writable,
1618 is also allowed. I.e.\& \s+3~\s0dmask & 022)
1622 checks current process is owner of the file, or it has
1623 CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
1624 normal check is too inflexible. With this option you can relax it.
1628 Three different levels of pickiness can be chosen:
1632 Upper and lower case are accepted and equivalent, long name parts are
1634 .I verylongname.foobar
1637 leading and embedded spaces are accepted in each name part (name and extension).
1640 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1641 rejected. This is the default.
1644 Like "normal", but names that contain long parts or special characters
1645 that are sometimes used on Linux but are not accepted by MS-DOS
1646 (+, =, etc.) are rejected.
1650 Sets the codepage for converting to shortname characters on FAT
1651 and VFAT filesystems. By default, codepage 437 is used.
1654 This option is obsolete and may fail or being ignored.
1656 .BI cvf_format= module
1657 Forces the driver to use the CVF (Compressed Volume File) module
1659 instead of auto-detection. If the kernel supports kmod, the
1660 cvf_format=xxx option also controls on-demand CVF module loading.
1661 This option is obsolete.
1663 .BI cvf_option= option
1664 Option passed to the CVF module. This option is obsolete.
1669 flag. A version string and a list of filesystem parameters will be
1670 printed (these data are also printed if the parameters appear to be
1674 If set, causes discard/TRIM commands to be issued to the block device
1675 when blocks are freed. This is useful for SSD devices and
1676 sparse/thinly-provisioned LUNs.
1679 If set, use a fallback default BIOS Parameter Block configuration, determined
1680 by backing device size. These static parameters match defaults assumed by DOS
1681 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1683 .BR errors= { panic | continue | remount-ro }
1684 Specify FAT behavior on critical errors: panic, continue without doing
1685 anything, or remount the partition in read-only mode (default behavior).
1687 .BR fat= { 12 | 16 | 32 }
1688 Specify a 12, 16 or 32 bit fat. This overrides
1689 the automatic FAT type detection routine. Use with caution!
1691 .BI iocharset= value
1692 Character set to use for converting between 8 bit characters
1693 and 16 bit Unicode characters. The default is iso8859-1.
1694 Long filenames are stored on disk in Unicode format.
1696 .BR nfs= { stale_rw | nostale_ro }
1697 Enable this only if you want to export the FAT filesystem over NFS.
1700 This option maintains an index (cache) of directory inodes which is used by the
1701 nfs-related code to improve look-ups. Full file operations (read/write) over
1702 NFS are supported but with cache eviction at NFS server, this could result in
1708 This option bases the inode number and file handle
1709 on the on-disk location of a file in the FAT directory entry.
1712 will not be returned after a file is
1713 evicted from the inode cache. However, it means that operations
1714 such as rename, create and unlink could cause file handles that
1715 previously pointed at one file to point at a different file,
1716 potentially causing data corruption. For this reason, this
1717 option also mounts the filesystem readonly.
1719 To maintain backward compatibility, '\-o nfs' is also accepted,
1724 This option disables the conversion of timestamps
1725 between local time (as used by Windows on FAT) and UTC
1726 (which Linux uses internally). This is particularly
1727 useful when mounting devices (like digital cameras)
1728 that are set to UTC in order to avoid the pitfalls of
1731 .BI time_offset= minutes
1732 Set offset for conversion of timestamps from local time used by FAT to UTC.
1735 will be subtracted from each timestamp to convert it to UTC used
1736 internally by Linux. This is useful when the time zone set in the kernel via
1737 .BR settimeofday (2)
1738 is not the time zone used by the filesystem. Note
1739 that this option still does not provide correct time stamps in all cases in
1740 presence of DST - time stamps in a different DST setting will be off by one
1746 flag. Attempts to chown or chmod files do not return errors,
1747 although they fail. Use with caution!
1750 FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
1751 directory will just be ignored, and is used only by applications as a flag
1752 (e.g.\& it's set for the customized folder).
1754 If you want to use ATTR_RO as read-only flag even for the directory, set this
1758 If set, the execute permission bits of the file will be allowed only if
1759 the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
1762 If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1766 If set, the filesystem will try to flush to disk more early than normal.
1770 Use the "free clusters" value stored on FSINFO. It'll
1771 be used to determine number of free clusters without
1772 scanning disk. But it's not used by default, because
1773 recent Windows don't update it correctly in some
1774 case. If you are sure the "free clusters" on FSINFO is
1775 correct, by this option you can avoid scanning disk.
1777 .BR dots ", " nodots ", " dotsOK= [ yes | no ]
1778 Various misguided attempts to force Unix or DOS conventions
1779 onto a FAT filesystem.
1781 .SS "Mount options for hfs"
1783 .BI creator= cccc ", type=" cccc
1784 Set the creator/type values as shown by the MacOS finder
1785 used for creating new files. Default values: '????'.
1787 .BI uid= n ", gid=" n
1788 Set the owner and group of all files.
1789 (Default: the UID and GID of the current process.)
1791 .BI dir_umask= n ", file_umask=" n ", umask=" n
1792 Set the umask used for all directories, all regular files, or all
1793 files and directories. Defaults to the umask of the current process.
1796 Select the CDROM session to mount.
1797 Defaults to leaving that decision to the CDROM driver.
1798 This option will fail with anything but a CDROM as underlying device.
1801 Select partition number n from the device.
1802 Only makes sense for CDROMs.
1803 Defaults to not parsing the partition table at all.
1806 Don't complain about invalid mount options.
1808 .SS "Mount options for hpfs"
1810 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1811 Set the owner and group of all files. (Default: the UID and GID
1812 of the current process.)
1815 Set the umask (the bitmask of the permissions that are
1817 present). The default is the umask of the current process.
1818 The value is given in octal.
1820 .BR case= { lower | asis }
1821 Convert all files names to lower case, or leave them.
1826 This option is obsolete and may fail or being ignored.
1829 Do not abort mounting when certain consistency checks fail.
1831 .SS "Mount options for iso9660"
1832 ISO 9660 is a standard describing a filesystem structure to be used
1833 on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1839 filenames appear in an 8.3 format (i.e., DOS-like restrictions on filename
1840 length), and in addition all characters are in upper case. Also there is
1841 no field for file ownership, protection, number of links, provision for
1842 block/character devices, etc.
1844 Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1845 features. Basically there are extensions to each directory record that
1846 supply all of the additional information, and when Rock Ridge is in use,
1847 the filesystem is indistinguishable from a normal UNIX filesystem (except
1848 that it is read-only, of course).
1851 Disable the use of Rock Ridge extensions, even if available. Cf.\&
1855 Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1858 .BR check= { r [ elaxed ]| s [ trict ]}
1861 a filename is first converted to lower case before doing the lookup.
1862 This is probably only meaningful together with
1869 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1870 Give all files in the filesystem the indicated user or group id,
1871 possibly overriding the information found in the Rock Ridge extensions.
1875 .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1876 For non-Rock Ridge volumes, normal name translation maps upper
1877 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1880 no name translation is done. See
1887 but also apply Acorn extensions if present.
1890 For non-Rock Ridge volumes, give all files the indicated mode.
1891 (Default: read and execute permission for everybody.)
1892 Octal mode values require a leading 0.
1895 Also show hidden and associated files.
1896 (If the ordinary files and the associated or hidden files have
1897 the same filenames, this may make the ordinary files inaccessible.)
1899 .BR block= { 512 | 1024 | 2048 }
1900 Set the block size to the indicated value.
1905 This option is obsolete and may fail or being ignored.
1908 If the high byte of the file length contains other garbage,
1909 set this mount option to ignore the high order bits of the file length.
1910 This implies that a file cannot be larger than 16\ MB.
1913 Select number of session on multisession CD.
1916 Session begins from sector xxx.
1918 The following options are the same as for vfat and specifying them only makes
1919 sense when using discs encoded using Microsoft's Joliet extensions.
1921 .BI iocharset= value
1922 Character set to use for converting 16 bit Unicode characters on CD
1923 to 8 bit characters. The default is iso8859-1.
1926 Convert 16 bit Unicode characters on CD to UTF-8.
1928 .SS "Mount options for jfs"
1931 Character set to use for converting from Unicode to ASCII. The default is
1932 to do no conversion. Use
1934 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1940 Resize the volume to
1942 blocks. JFS only supports growing a volume, not shrinking it. This option
1943 is only valid during a remount, when the volume is mounted read-write. The
1945 keyword with no value will grow the volume to the full size of the partition.
1948 Do not write to the journal. The primary use of this option is to allow
1949 for higher performance when restoring a volume from backup media. The
1950 integrity of the volume is not guaranteed if the system abnormally ends.
1953 Default. Commit metadata changes to the journal. Use this option to remount
1956 option was previously specified in order to restore normal behavior.
1958 .BR errors= { continue | remount-ro | panic }
1959 Define the behavior when an error is encountered.
1960 (Either ignore errors and just mark the filesystem erroneous and continue,
1961 or remount the filesystem read-only, or panic and halt the system.)
1963 .BR noquota | quota | usrquota | grpquota
1964 These options are accepted but ignored.
1966 .SS "Mount options for msdos"
1967 See mount options for fat.
1970 filesystem detects an inconsistency, it reports an error and sets the file
1971 system read-only. The filesystem can be made writable again by remounting
1974 .SS "Mount options for ncpfs"
1976 .IR nfs ", the " ncpfs
1977 implementation expects a binary argument (a
1978 .IR "struct ncp_mount_data" )
1979 to the mount system call. This argument is constructed by
1981 and the current version of
1983 (2.12) does not know anything about ncpfs.
1985 .SS "Mount options for ntfs"
1988 Character set to use when returning file names.
1989 Unlike VFAT, NTFS suppresses names that contain
1990 nonconvertible characters. Deprecated.
1993 New name for the option earlier called
1997 Use UTF-8 for converting file names.
1999 .BR uni_xlate= { 0 | 1 | 2 }
2000 For 0 (or `no' or `false'), do not use escape sequences
2001 for unknown Unicode characters.
2002 For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
2003 starting with ":". Here 2 give a little-endian encoding
2004 and 1 a byteswapped bigendian encoding.
2007 If enabled (posix=1), the filesystem distinguishes between
2008 upper and lower case. The 8.3 alias names are presented as
2009 hard links instead of being suppressed. This option is obsolete.
2011 \fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
2012 Set the file permission on the filesystem.
2013 The umask value is given in octal.
2014 By default, the files are owned by root and not readable by somebody else.
2016 .SS "Mount options for overlay"
2017 Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
2020 An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
2021 a \fBlower\fR filesystem. When a name exists in both filesystems, the object
2022 in the upper filesystem is visible while the object in the lower filesystem is
2023 either hidden or, in the case of directories, merged with the upper object.
2025 The lower filesystem can be any filesystem supported by Linux and does not need
2026 to be writable. The lower filesystem can even be another overlayfs. The upper
2027 filesystem will normally be writable and if it is it must support the creation
2028 of trusted.* extended attributes, and must provide a valid d_type in readdir
2029 responses, so NFS is not suitable.
2031 A read-only overlay of two read-only filesystems may use any filesystem type.
2032 The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
2038 .B "mount \-t overlay overlay \e"
2039 .B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
2045 .BI lowerdir= directory
2046 Any filesystem, does not need to be on a writable filesystem.
2048 .BI upperdir= directory
2049 The upperdir is normally on a writable filesystem.
2051 .BI workdir= directory
2052 The workdir needs to be an empty directory on the same filesystem as upperdir.
2054 .SS "Mount options for reiserfs"
2055 Reiserfs is a journaling filesystem.
2058 Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
2059 using the 3.6 format for newly created objects. This filesystem will no
2060 longer be compatible with reiserfs 3.5 tools.
2062 .BR hash= { rupasov | tea | r5 | detect }
2063 Choose which hash function reiserfs will use to find files within directories.
2067 A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
2068 mapping lexicographically close file names to close hash values.
2069 This option should not be used, as it causes a high probability of hash
2073 A Davis-Meyer function implemented by Jeremy Fitzhardinge.
2074 It uses hash permuting bits in the name. It gets high randomness
2075 and, therefore, low probability of hash collisions at some CPU cost.
2076 This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
2079 A modified version of the rupasov hash. It is used by default and is
2080 the best choice unless the filesystem has huge directories and
2081 unusual file-name patterns.
2086 to detect which hash function is in use by examining
2087 the filesystem being mounted, and to write this information into
2088 the reiserfs superblock. This is only useful on the first mount of
2089 an old format filesystem.
2092 .B hashed_relocation
2093 Tunes the block allocator. This may provide performance improvements
2096 .B no_unhashed_relocation
2097 Tunes the block allocator. This may provide performance improvements
2101 Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
2102 This may provide performance improvements in some situations.
2105 Disable journaling. This will provide slight performance improvements in
2106 some situations at the cost of losing reiserfs's fast recovery from crashes.
2107 Even with this option turned on, reiserfs still performs all journaling
2108 operations, save for actual writes into its journaling area. Implementation
2111 is a work in progress.
2114 By default, reiserfs stores small files and `file tails' directly into its
2115 tree. This confuses some utilities such as
2117 This option is used to disable packing of files into the tree.
2120 Replay the transactions which are in the journal, but do not actually
2121 mount the filesystem. Mainly used by
2125 A remount option which permits online expansion of reiserfs partitions.
2126 Instructs reiserfs to assume that the device has
2129 This option is designed for use with devices which are under logical
2130 volume management (LVM).
2133 utility which can be obtained from
2134 .IR ftp://ftp.namesys.com/pub/reiserfsprogs .
2137 Enable Extended User Attributes. See the
2142 Enable POSIX Access Control Lists. See the
2146 .BR barrier=none " / " barrier=flush "
2147 This disables / enables the use of write barriers in the journaling code.
2148 barrier=none disables, barrier=flush enables (default). This also requires an
2149 IO stack which can support barriers, and if reiserfs gets an error on a barrier
2150 write, it will disable barriers again with a warning. Write barriers enforce
2151 proper on-disk ordering of journal commits, making volatile disk write caches
2152 safe to use, at some performance penalty. If your disks are battery-backed in
2153 one way or another, disabling barriers may safely improve performance.
2155 .SS "Mount options for ubifs"
2156 UBIFS is a flash filesystem which works on top of UBI volumes. Note that
2157 \fBatime\fR is not supported and is always turned off.
2159 The device name may be specified as
2187 separator may be used instead of
2190 The following mount options are available:
2193 Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2194 system. Bulk-Read is an internal optimization. Some flashes may read faster if
2195 the data are read at one go, rather than at several read requests. For
2196 example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2199 Do not bulk-read. This is the default.
2202 Check data CRC-32 checksums. This is the default.
2204 .BR no_chk_data_crc .
2205 Do not check data CRC-32 checksums. With this option, the filesystem does not
2206 check CRC-32 checksum for data, but it does check it for the internal indexing
2207 information. This option only affects reading, not writing. CRC-32 is always
2208 calculated when writing the data.
2210 .BR compr= { none | lzo | zlib }
2211 Select the default compressor which is used when new files are written. It is
2212 still possible to read compressed files if mounted with the
2216 .SS "Mount options for udf"
2217 UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
2218 Storage Technology Association, and is often used for DVD-ROM, frequently
2219 in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
2220 perfectly usable by itself on disk drives, flash drives and other block devices.
2225 Make all files in the filesystem belong to the given user.
2226 uid=forget can be specified independently of (or usually in
2227 addition to) uid=<user> and results in UDF
2228 not storing uids to the media. In fact the recorded uid
2229 is the 32-bit overflow uid \-1 as defined by the UDF standard.
2230 The value is given as either <user> which is a valid user name or the corresponding
2231 decimal user id, or the special string "forget".
2234 Make all files in the filesystem belong to the given group.
2235 gid=forget can be specified independently of (or usually in
2236 addition to) gid=<group> and results in UDF
2237 not storing gids to the media. In fact the recorded gid
2238 is the 32-bit overflow gid \-1 as defined by the UDF standard.
2239 The value is given as either <group> which is a valid group name or the corresponding
2240 decimal group id, or the special string "forget".
2243 Mask out the given permissions from all inodes read from the filesystem.
2244 The value is given in octal.
2247 If mode= is set the permissions of all non-directory inodes read from the
2248 filesystem will be set to the given mode. The value is given in octal.
2251 If dmode= is set the permissions of all directory inodes read from the
2252 filesystem will be set to the given dmode. The value is given in octal.
2255 Set the block size. Default value prior to kernel version 2.6.30 was
2256 2048. Since 2.6.30 and prior to 4.11 it was logical device block size with
2257 fallback to 2048. Since 4.11 it is logical block size with fallback to
2258 any valid block size between logical device block size and 4096.
2260 For other details see the \fBmkudffs\fP(8) 2.0+ manpage, sections
2261 \fBCOMPATIBILITY\fP and \fBBLOCK SIZE\fP.
2264 Show otherwise hidden files.
2267 Show deleted files in lists.
2270 Embed data in the inode. (default)
2273 Don't embed data in the inode.
2276 Use short UDF address descriptors.
2279 Use long UDF address descriptors. (default)
2282 Unset strict conformance.
2285 Set the NLS character set. This requires kernel compiled with CONFIG_UDF_NLS option.
2288 Set the UTF-8 character set.
2289 .SS Mount options for debugging and disaster recovery
2292 Ignore the Volume Recognition Sequence and attempt to mount anyway.
2295 Select the session number for multi-session recorded optical media. (default= last session)
2298 Override standard anchor location. (default= 256)
2301 Set the last block of the filesystem.
2302 .SS Unused historical mount options that may be encountered and should be removed
2305 Ignored, use uid=<user> instead.
2308 Ignored, use gid=<group> instead.
2311 Unimplemented and ignored.
2314 Unimplemented and ignored.
2317 Unimplemented and ignored.
2320 Unimplemented and ignored.
2322 .SS "Mount options for ufs"
2325 UFS is a filesystem widely used in different operating systems.
2326 The problem are differences among implementations. Features of some
2327 implementations are undocumented, so its hard to recognize the
2328 type of ufs automatically.
2329 That's why the user must specify the type of ufs by mount option.
2330 Possible values are:
2334 Old format of ufs, this is the default, read only.
2335 (Don't forget to give the \-r option.)
2338 For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
2341 Used in FreeBSD 5.x supported as read-write.
2347 For filesystems created by SunOS or Solaris on Sparc.
2350 For filesystems created by Solaris on x86.
2353 For filesystems created by HP-UX, read-only.
2356 For filesystems created by NeXTStep (on NeXT station) (currently read only).
2359 For NextStep CDROMs (block_size == 2048), read-only.
2362 For filesystems created by OpenStep (currently read only).
2363 The same filesystem type is also used by Mac OS X.
2368 Set behavior on error:
2372 If an error is encountered, cause a kernel panic.
2374 .RB [ lock | umount | repair ]
2375 These mount options don't do anything at present;
2376 when an error is encountered only a console message is printed.
2379 .SS "Mount options for umsdos"
2380 See mount options for msdos.
2383 option is explicitly killed by
2386 .SS "Mount options for vfat"
2387 First of all, the mount options for
2392 option is explicitly killed by
2394 Furthermore, there are
2397 Translate unhandled Unicode characters to special escaped sequences.
2398 This lets you backup and restore filenames that are created with any
2399 Unicode characters. Without this option, a '?' is used when no
2400 translation is possible. The escape character is ':' because it is
2401 otherwise invalid on the vfat filesystem. The escape sequence
2402 that gets used, where u is the Unicode character,
2403 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2406 Allow two files with names that only differ in case.
2407 This option is obsolete.
2410 First try to make a short name without sequence number,
2412 .IR name\s+3~\s0num.ext .
2415 UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2416 console. It can be enabled for the filesystem with this option or disabled
2417 with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2421 Defines the behavior for creation and display of filenames which fit into
2422 8.3 characters. If a long name for a file exists, it will always be the
2423 preferred one for display. There are four \fImode\fRs:
2427 Force the short name to lower case upon display; store a long name when
2428 the short name is not all upper case.
2431 Force the short name to upper case upon display; store a long name when
2432 the short name is not all upper case.
2435 Display the short name as is; store a long name when the short name is
2436 not all lower case or all upper case.
2439 Display the short name as is; store a long name when the short name is not
2440 all upper case. This mode is the default since Linux 2.6.32.
2443 .SS "Mount options for usbfs"
2445 \fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
2446 Set the owner and group and mode of the device files in the usbfs filesystem
2447 (default: uid=gid=0, mode=0644). The mode is given in octal.
2449 \fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
2450 Set the owner and group and mode of the bus directories in the usbfs
2451 filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2453 \fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
2454 Set the owner and group and mode of the file
2456 (default: uid=gid=0, mode=0444). The mode is given in octal.
2458 .SH DM-VERITY SUPPORT (experimental)
2459 The device-mapper verity target provides read-only transparent integrity
2460 checking of block devices using kernel crypto API. The mount command can open
2461 the dm-verity device and do the integrity verification before on the device
2462 filesystem is mounted. Requires libcryptsetup with in libmount. If
2463 libcryptsetup supports extracting the root hash of an already mounted device,
2464 existing devices will be automatically reused in case of a match.
2465 Mount options for dm-verity:
2467 \fBverity.hashdevice=\fP\,\fIpath\fP
2468 Path to the hash tree device associated with the source volume to pass to dm-verity.
2470 \fBverity.roothash=\fP\,\fIhex\fP
2471 Hex-encoded hash of the root of
2472 .I verity.hashdevice
2473 Mutually exclusive with
2474 .I verity.roothashfile.
2476 \fBverity.roothashfile=\fP\,\fIpath\fP
2477 Path to file containing the hex-encoded hash of the root of
2478 .I verity.hashdevice.
2479 Mutually exclusive with
2482 \fBverity.hashoffset=\fP\,\fIoffset\fP
2483 If the hash tree device is embedded in the source volume,
2485 (default: 0) is used by dm-verity to get to the tree.
2487 \fBverity.fecdevice=\fP\,\fIpath\fP
2488 Path to the Forward Error Correction (FEC) device associated with the source volume to pass to dm-verity.
2489 Optional. Requires kernel built with CONFIG_DM_VERITY_FEC.
2491 \fBverity.fecoffset=\fP\,\fIoffset\fP
2492 If the FEC device is embedded in the source volume,
2494 (default: 0) is used by dm-verity to get to the FEC area. Optional.
2496 \fBverity.fecroots=\fP\,\fIvalue\fP
2497 Parity bytes for FEC (default: 2). Optional.
2499 \fBverity.roothashsig=\fP\,\fIpath\fP
2500 Path to pkcs7 signature of root hash hex string. Requires crypt_activate_by_signed_key() from cryptsetup and
2501 kernel built with CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG. For device reuse, signatures have to be either used by all
2502 mounts of a device or by none. Optional.
2504 Supported since util-linux v2.35.
2506 For example commands:
2510 .B mksquashfs /etc /tmp/etc.squashfs
2511 .B dd if=/dev/zero of=/tmp/etc.hash bs=1M count=10
2512 .B veritysetup format /tmp/etc.squashfs /tmp/etc.hash
2513 .B openssl smime \-sign \-in <hash> \-nocerts \-inkey private.key \-signer private.crt \-noattr \-binary \-outform der \-out /tmp/etc.p7
2514 .B mount \-o verity.hashdevice=/tmp/etc.hash,verity.roothash=<hash>,verity.roothashsig=/tmp/etc.p7 /tmp/etc.squashfs /mnt
2518 create squashfs image from /etc directory, verity hash device
2519 and mount verified filesystem image to /mnt.
2520 The kernel will verify that the root hash is signed by a key from the kernel keyring if roothashsig is used.
2522 .SH LOOP-DEVICE SUPPORT
2523 One further possible type is a mount via the loop device. For example,
2527 .B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
2530 will set up the loop device
2532 to correspond to the file
2534 and then mount this device on
2537 If no explicit loop device is mentioned
2538 (but just an option `\fB\-o loop\fP' is given), then
2540 will try to find some unused loop device and use that, for example
2543 .B "mount /tmp/disk.img /mnt \-o loop"
2548 creates a loop device from a regular file if a filesystem type is
2549 not specified or the filesystem is known for libblkid, for example:
2552 .B "mount /tmp/disk.img /mnt"
2554 .B "mount \-t ext4 /tmp/disk.img /mnt"
2557 This type of mount knows about three options, namely
2558 .BR loop ", " offset " and " sizelimit ,
2559 that are really options to
2561 (These options can be used in addition to those specific
2562 to the filesystem type.)
2564 Since Linux 2.6.25 auto-destruction of loop devices is supported,
2565 meaning that any loop device allocated by
2572 You can also free a loop device by hand, using
2573 .BR "losetup \-d " or " umount \-d" .
2575 Since util-linux v2.29 mount command re-uses the loop device rather than
2576 initialize a new device if the same backing file is already used for some loop
2577 device with the same offset and sizelimit. This is necessary to avoid
2578 a filesystem corruption.
2582 has the following exit status values (the bits can be ORed):
2588 incorrect invocation or permissions
2591 system error (out of memory, cannot fork, no more loop devices)
2602 problems writing or locking /etc/mtab
2608 some mount succeeded
2610 The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2611 failed, some succeeded).
2613 .SH EXTERNAL HELPERS
2614 The syntax of external mount helpers is:
2617 .BI /sbin/mount. suffix
2625 .IR type \fB. subtype ]
2628 where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvoN\fR options have
2629 the same meaning as the normal mount options. The \fB\-t\fR option is used for
2630 filesystems with subtypes support (for example
2631 .BR "/sbin/mount.fuse \-t fuse.sshfs" ).
2633 The command \fBmount\fR does not pass the mount options
2650 to the mount.<suffix> helpers. All other options are used in a
2651 comma-separated list as argument to the \fB\-o\fR option.
2654 .IP LIBMOUNT_FSTAB=<path>
2655 overrides the default location of the
2657 file (ignored for suid)
2658 .IP LIBMOUNT_MTAB=<path>
2659 overrides the default location of the
2661 file (ignored for suid)
2662 .IP LIBMOUNT_DEBUG=all
2663 enables libmount debug output
2664 .IP LIBBLKID_DEBUG=all
2665 enables libblkid debug output
2666 .IP LOOPDEV_DEBUG=all
2667 enables loop device setup debug output
2669 See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
2675 libmount private runtime directory
2678 table of mounted filesystems or symlink to
2681 .I /etc/mtab\s+3~\s0
2682 lock file (unused on systems with mtab symlink)
2685 temporary file (unused on systems with mtab symlink)
2688 a list of filesystem types to try
2692 command existed in Version 5 AT&T UNIX.
2694 It is possible for a corrupted filesystem to cause a crash.
2696 Some Linux filesystems don't support
2697 .BR "\-o sync " nor " \-o dirsync"
2698 (the ext2, ext3, ext4, fat and vfat filesystems
2700 support synchronous updates (a la BSD) when mounted with the
2706 may not be able to change mount parameters (all
2707 .IR ext2fs -specific
2710 are changeable with a remount, for example, but you can't change
2717 It is possible that the files
2721 don't match on systems with a regular mtab file. The first file is based only on
2722 the mount command options, but the content of the second file also depends on
2723 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2724 the mount command may report unreliable information about an NFS mount point
2727 file usually contains more reliable information.) This is
2728 another reason to replace the
2730 file with a symlink to the
2734 Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
2738 families of functions) may lead to inconsistent results due to the lack of
2739 a consistency check in the kernel even if noac is used.
2747 options used may fail when using older kernels if the
2749 command can't confirm that the size of the block device has been configured
2750 as requested. This situation can be worked around by using
2753 command manually before calling
2755 with the configured loop device.
2758 Karel Zak <kzak@redhat.com>
2769 .BR mount_namespaces (7)
2783 The mount command is part of the util-linux package and is available from
2784 https://www.kernel.org/pub/linux/utils/util-linux/.