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 /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 Since version 2.35 \fBmount\fR command does not exit when user permissions are
319 inadequate by internal libmount security rules. It drops suid permissions
320 and continue as regular non-root user. It allows to support use-cases where
321 root permissions are not necessary (e.g., fuse filesystems, user namespaces,
324 For more details, see
326 Only the user that mounted a filesystem can unmount it again.
327 If any user should be able to unmount it, then use
336 option is similar to the
338 option, with the restriction that the user must be the owner
339 of the special file. This may be useful e.g.\& for
341 if a login script makes the console user owner of this device.
344 option is similar, with the restriction that the user must be
345 member of the group of the special file.
347 .SS Bind mount operation
348 Remount part of the file hierarchy somewhere else. The call is:
356 or by using this fstab entry:
365 After this call the same contents are accessible in two places.
367 It is important to understand that "bind" does not to create any second-class
368 or special node in the kernel VFS. The "bind" is just another operation to
369 attach a filesystem. There is nowhere stored information that the filesystem
370 has been attached by "bind" operation. The \fIolddir\fR and \fInewdir\fR are
371 independent and the \fIolddir\fR may be umounted.
373 One can also remount a single file (on a single file). It's also
374 possible to use the bind mount to create a mountpoint from a regular
375 directory, for example:
379 .B mount \-\-bind foo foo
382 The bind mount call attaches only (part of) a single filesystem, not possible
383 submounts. The entire file hierarchy including submounts is attached
384 a second place by using:
392 Note that the filesystem mount options maintained by kernel will remain the same as those
393 on the original mount point. The userspace mount options (e.g., _netdev) will not be copied
396 and it's necessary explicitly specify the options on mount command line.
399 since v2.27 allows to change the mount options by passing the
400 relevant options along with
406 .B mount \-o bind,ro foo foo
409 This feature is not supported by the Linux kernel; it is implemented in userspace
410 by an additional \fBmount\fR(2) remounting system call.
411 This solution is not atomic.
413 The alternative (classic) way to create a read-only bind mount is to use the remount
414 operation, for example:
421 .B mount \-o remount,bind,ro
425 Note that a read-only bind will create a read-only mountpoint (VFS entry),
426 but the original filesystem superblock will still be writable, meaning that the
428 will be writable, but the
432 It's also possible to change nosuid, nodev, noexec, noatime, nodiratime and
433 relatime VFS entry flags by "remount,bind" operation. The another (for example
434 filesystem specific flags) are silently ignored. It's impossible to change mount
435 options recursively (for example with \fB\-o rbind,ro\fR).
438 since v2.31 ignores the \fBbind\fR flag from
442 (if "\-o remount" specified on command line). This is necessary to fully control
443 mount options on remount by command line. In the previous versions the bind
444 flag has been always applied and it was impossible to re-define mount options
445 without interaction with the bind semantic. This
447 behavior does not affect situations when "remount,bind" is specified in the
451 .SS The move operation
454 to another place (atomically). The call is:
462 This will cause the contents which previously appeared under
464 to now be accessible under
466 The physical location of the files is not changed.
469 has to be a mountpoint.
471 Note also that moving a mount residing under a shared mount is invalid and
473 .B findmnt \-o TARGET,PROPAGATION
474 to see the current propagation flags.
476 .SS Shared subtree operations
477 Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
478 private, slave or unbindable. A shared mount provides the ability to create mirrors
479 of that mount such that mounts and unmounts within any of the mirrors propagate
480 to the other mirror. A slave mount receives propagation from its master, but
481 not vice versa. A private mount carries no propagation abilities. An
482 unbindable mount is a private mount which cannot be cloned through a bind
483 operation. The detailed semantics are documented in
484 .I Documentation/filesystems/sharedsubtree.txt
485 file in the kernel source tree.
487 Supported operations are:
491 .BI "mount \-\-make\-shared " mountpoint
492 .BI "mount \-\-make\-slave " mountpoint
493 .BI "mount \-\-make\-private " mountpoint
494 .BI "mount \-\-make\-unbindable " mountpoint
498 The following commands allow one to recursively change the type of all the
499 mounts under a given mountpoint.
503 .BI "mount \-\-make\-rshared " mountpoint
504 .BI "mount \-\-make\-rslave " mountpoint
505 .BI "mount \-\-make\-rprivate " mountpoint
506 .BI "mount \-\-make\-runbindable " mountpoint
513 when a \fB\-\-make-\fR* operation is requested. All necessary information has to be
514 specified on the command line.
516 Note that the Linux kernel does not allow to change multiple propagation flags
519 system call, and the flags cannot be mixed with other mount options and operations.
521 Since util-linux 2.23 the \fBmount\fR command allows to do more propagation
522 (topology) changes by one mount(8) call and do it also together with other
523 mount operations. This feature is EXPERIMENTAL. The propagation flags are applied
524 by additional \fBmount\fR(2) system calls when the preceding mount operations
525 were successful. Note that this use case is not atomic. It is possible to
526 specify the propagation flags in
542 .B mount \-\-make\-private \-\-make\-unbindable /dev/sda1 /foo
550 .B mount /dev/sda1 /foo
551 .B mount \-\-make\-private /foo
552 .B mount \-\-make\-unbindable /foo
556 .SH COMMAND-LINE OPTIONS
557 The full set of mount options used by an invocation of
559 is determined by first extracting the
560 mount options for the filesystem from the
562 table, then applying any options specified by the
564 argument, and finally applying a
566 option, when present.
568 The command \fBmount\fR does not pass all command-line options to the
569 \fB/sbin/mount.\fIsuffix\fR mount helpers. The interface between \fBmount\fR
570 and the mount helpers is described below in the section \fBEXTERNAL HELPERS\fR.
572 Command-line options available for the
577 Mount all filesystems (of the given types) mentioned in
579 (except for those whose line contains the
581 keyword). The filesystems are mounted following their order in
583 The mount command compares filesystem source, target (and fs root for bind
584 mount or btrfs) to detect already mounted filesystems. The kernel table with
585 already mounted filesystems is cached during \fBmount \-\-all\fR. It means
586 that all duplicated fstab entries will be mounted.
588 The option \fB\-\-all\fR is possible to use for remount operation too. In this
589 case all filters (\fB\-t\fR and \fB\-O\fR) are applied to the table of already
592 Since version 2.35 is possible to use the command line option \fB\-o\fR to
593 alter mount options from fstab (see also \fB\-\-options\-mode\fR).
595 Note that it is a bad practice to use \fBmount \-a\fR for
597 checking. The recommended solution is \fBfindmnt \-\-verify\fR.
599 .BR \-B , " \-\-bind"
600 Remount a subtree somewhere else (so that its contents are available
601 in both places). See above, under \fBBind mounts\fR.
603 .BR \-c , " \-\-no\-canonicalize"
604 Don't canonicalize paths. The mount command canonicalizes all paths
605 (from command line or fstab) by default. This option can be used
608 flag for already canonicalized absolute paths. The option is designed for mount
609 helpers which call \fBmount \-i\fR. It is strongly recommended to not use this
610 command-line option for normal mount operations.
612 Note that \fBmount\fR(8) does not pass this option to the
613 \fB/sbin/mount.\fItype\fR helpers.
615 .BR \-F , " \-\-fork"
616 (Used in conjunction with
618 Fork off a new incarnation of \fBmount\fR for each device.
619 This will do the mounts on different devices or different NFS servers
621 This has the advantage that it is faster; also NFS timeouts go in
622 parallel. A disadvantage is that the mounts are done in undefined order.
623 Thus, you cannot use this option if you want to mount both
627 .IP "\fB\-f, \-\-fake\fP"
628 Causes everything to be done except for the actual system call; if it's not
629 obvious, this ``fakes'' mounting the filesystem. This option is useful in
632 flag to determine what the
634 command is trying to do. It can also be used to add entries for devices
635 that were mounted earlier with the \fB\-n\fR option. The \fB\-f\fR option
636 checks for an existing record in /etc/mtab and fails when the record already
637 exists (with a regular non-fake mount, this check is done by the kernel).
638 .IP "\fB\-i, \-\-internal\-only\fP"
639 Don't call the \fB/sbin/mount.\fIfilesystem\fR helper even if it exists.
641 .BR \-L , " \-\-label " \fIlabel
642 Mount the partition that has the specified
645 .BR \-l , " \-\-show\-labels"
646 Add the labels in the mount output. \fBmount\fR must have
647 permission to read the disk device (e.g.\& be set-user-ID root) for this to work.
648 One can set such a label for ext2, ext3 or ext4 using the
650 utility, or for XFS using
652 or for reiserfs using
653 .BR reiserfstune (8).
655 .BR \-M , " \-\-move"
656 Move a subtree to some other place. See above, the subsection
657 \fBThe move operation\fR.
659 .BR \-n , " \-\-no\-mtab"
660 Mount without writing in
662 This is necessary for example when
664 is on a read-only filesystem.
666 .BR \-N , " \-\-namespace " \fIns
667 Perform mount in namespace specified by \fIns\fR.
668 \fIns\fR is either PID of process running in that namespace
669 or special file representing that namespace.
672 switches to the namespace when it reads /etc/fstab, writes /etc/mtab (or writes to /run/mount) and calls
674 system call, otherwise it runs in the original namespace. It means that the target namespace does not have
675 to contain any libraries or another requirements necessary to execute
679 See \fBnamespaces\fR(7) for more information.
681 .BR \-O , " \-\-test\-opts " \fIopts
682 Limit the set of filesystems to which the
684 option applies. In this regard it is like the
690 For example, the command:
694 .B "mount \-a \-O no_netdev"
697 mounts all filesystems except those which have the option
699 specified in the options field in the
705 in that each option is matched exactly; a leading
707 at the beginning of one option does not negate the rest.
713 options are cumulative in effect; that is, the command
716 .B "mount \-a \-t ext2 \-O _netdev"
719 mounts all ext2 filesystems with the _netdev option, not all filesystems
720 that are either ext2 or have the _netdev option specified.
723 .BR \-o , " \-\-options " \fIopts
724 Use the specified mount options. The \fIopts\fR argument is
725 a comma-separated list. For example:
729 .B "mount LABEL=mydisk \-o noatime,nodev,nosuid"
733 For more details, see the
734 .B FILESYSTEM-INDEPENDENT MOUNT OPTIONS
736 .B FILESYSTEM-SPECIFIC MOUNT OPTIONS
741 .BR "\-\-options\-mode " \fImode
742 Controls how to combine options from fstab/mtab with options from command line.
743 \fImode\fR can be one of
744 .BR ignore ", " append ", " prepend " or " replace .
745 For example \fBappend\fR means that options from fstab are appended to options from command line.
746 Default value is \fBprepend\fR -- it means command line options are evaluated after fstab options.
747 Note that the last option wins if there are conflicting ones.
750 .BR "\-\-options\-source " \fIsource
751 Source of default options.
752 \fIsource\fR is comma separated list of
753 .BR fstab ", " mtab " and " disable .
754 \fBdisable\fR disables
755 .BR fstab " and " mtab
756 and disables \fB\-\-options\-source\-force\fR.
757 Default value is \fBfstab,mtab\fR.
760 .B \-\-options\-source\-force
761 Use options from fstab/mtab even if both \fIdevice\fR and \fIdir\fR are specified.
764 .BR \-R , " \-\-rbind"
765 Remount a subtree and all possible submounts somewhere else (so that its
766 contents are available in both places). See above, the subsection
769 .BR \-r , " \-\-read\-only"
770 Mount the filesystem read-only. A synonym is
773 Note that, depending on the filesystem type, state and kernel behavior, the
774 system may still write to the device. For example, ext3 and ext4 will replay the
775 journal if the filesystem is dirty. To prevent this kind of write access, you
776 may want to mount an ext3 or ext4 filesystem with the \fBro,noload\fR mount
777 options or set the block device itself to read-only mode, see the
782 Tolerate sloppy mount options rather than failing. This will ignore mount
783 options not supported by a filesystem type. Not all filesystems support this
784 option. Currently it's supported by the \fBmount.nfs\fR mount helper only.
786 .BI \-\-source " device"
787 If only one argument for the mount command is given then the argument might be
788 interpreted as target (mountpoint) or source (device). This option allows to
789 explicitly define that the argument is the mount source.
791 .BI \-\-target " directory"
792 If only one argument for the mount command is given then the argument might be
793 interpreted as target (mountpoint) or source (device). This option allows to
794 explicitly define that the argument is the mount target.
796 .BI \-\-target\-prefix " directory"
797 Prepend specified directory to all mount targets. This option allows to follow
798 fstab, but mount operations is done on another place, for example:
802 .B "mount \-\-all \-\-target\-prefix /chroot \-o X\-mount.mkdir
805 mounts all from system fstab to /chroot, all missing muontpoint are created
806 (due to X-mount.mkdir). See also \fB\-\-fstab\fP to use an alternative fstab.
809 .BR \-T , " \-\-fstab " \fIpath
810 Specifies an alternative fstab file. If \fIpath\fP is a directory then the files
811 in the directory are sorted by
813 files that start with "."\& or without an \&.fstab extension are ignored. The option
814 can be specified more than once. This option is mostly designed for initramfs
815 or chroot scripts where additional configuration is specified beyond standard
816 system configuration.
818 Note that \fBmount\fR(8) does not pass the option \fB\-\-fstab\fP to the
819 \fB/sbin/mount.\fItype\fR helpers, meaning that the alternative fstab files will be
820 invisible for the helpers. This is no problem for normal mounts, but user
821 (non-root) mounts always require fstab to verify the user's rights.
823 .BR \-t , " \-\-types " \fIfstype
824 The argument following the
826 is used to indicate the filesystem type. The filesystem types which are
827 currently supported depend on the running kernel. See
830 .I /lib/modules/$(uname \-r)/kernel/fs
831 for a complete list of the filesystems. The most common are ext2, ext3, ext4,
832 xfs, btrfs, vfat, sysfs, proc, nfs and cifs.
838 support filesystem subtypes. The subtype is defined by a '.subtype' suffix. For
839 example 'fuse.sshfs'. It's recommended to use subtype notation rather than add
840 any prefix to the mount source (for example 'sshfs#example.com' is
845 option is given, or if the
847 type is specified, mount will try to guess the desired type.
848 Mount uses the blkid library for guessing the filesystem
849 type; if that does not turn up anything that looks familiar,
850 mount will try to read the file
851 .IR /etc/filesystems ,
852 or, if that does not exist,
853 .IR /proc/filesystems .
854 All of the filesystem types listed there will be tried,
855 except for those that are labeled "nodev" (e.g.\&
862 ends in a line with a single *, mount will read
864 afterwards. While trying, all filesystem types will be
865 mounted with the mount option \fBsilent\fR.
869 type may be useful for user-mounted floppies.
872 can be useful to change the probe order (e.g., to try vfat before msdos
873 or ext3 before ext2) or if you use a kernel module autoloader.
875 More than one type may be specified in a comma-separated
880 entry. The list of filesystem types for option
884 to specify the filesystem types on which no action should be taken.
887 has no effect when specified in an
893 can be meaningful with the
895 option. For example, the command
899 .B "mount \-a \-t nomsdos,smbfs"
902 mounts all filesystems except those of type
907 For most types all the
909 program has to do is issue a simple
911 system call, and no detailed knowledge of the filesystem type is required.
912 For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) an ad hoc code is
913 necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems
914 have a separate mount program. In order to make it possible to
915 treat all types in a uniform way, \fBmount\fR will execute the program
916 .BI /sbin/mount. type
917 (if that exists) when called with type
919 Since different versions of the
921 program have different calling conventions,
923 may have to be a shell script that sets up the desired call.
926 .BR \-U , " \-\-uuid " \fIuuid
927 Mount the partition that has the specified
930 .BR \-v , " \-\-verbose"
933 .BR \-w , " \-\-rw" , " \-\-read\-write"
934 Mount the filesystem read/write. The read-write is kernel default and
936 default is to try read-only if the previous mount syscall with read-write flags
937 on write-protected devices of filesystems failed.
942 Note that specify \fB\-w\fR on command line forces \fBmount\fR command to never
943 try read-only mount on write-protected devices or already mounted read-only
946 .BR \-V , " \-\-version"
947 Display version information and exit.
949 .BR \-h , " \-\-help"
950 Display help text and exit.
952 .SH FILESYSTEM-INDEPENDENT MOUNT OPTIONS
953 Some of these options are only useful when they appear in the
957 Some of these options could be enabled or disabled by default
958 in the system kernel. To check the current setting see the options
959 in /proc/mounts. Note that filesystems also have per-filesystem
960 specific default mount options (see for example \fBtune2fs \-l\fP
961 output for extN filesystems).
963 The following options apply to any filesystem that is being
964 mounted (but not every filesystem actually honors them \(en e.g.\&, the
966 option today has an effect only for ext2, ext3, ext4, fat, vfat, ufs and xfs):
970 All I/O to the filesystem should be done asynchronously. (See also the
975 Do not use the \fBnoatime\fR feature, so the inode access time is controlled
976 by kernel defaults. See also the descriptions of the \fB\%relatime\fR and
981 Do not update inode access times on this filesystem (e.g.\& for faster
982 access on the news spool to speed up news servers). This works for all
983 inode types (directories too), so it implies \fB\%nodiratime\fR.
986 Can be mounted with the
991 Can only be mounted explicitly (i.e., the
993 option will not cause the filesystem to be mounted).
996 .BR context=\fIcontext ", " fscontext=\fIcontext ", " defcontext=\fIcontext ", and " \%rootcontext=\fIcontext
1000 option is useful when mounting filesystems that do not support
1001 extended attributes, such as a floppy or hard disk formatted with VFAT, or
1002 systems that are not normally running under SELinux, such as an ext3 or ext4 formatted
1004 disk from a non-SELinux workstation. You can also use
1006 on filesystems you do not trust, such as a floppy. It also helps in compatibility with
1007 xattr-supporting filesystems on earlier 2.4.<x> kernel versions. Even where
1008 xattrs are supported, you can save time not having to label every file by
1009 assigning the entire disk one security context.
1011 A commonly used option for removable media is
1012 .BR \%context="system_u:object_r:removable_t" .
1014 Two other options are
1018 both of which are mutually exclusive of the context option. This means you
1019 can use fscontext and defcontext with each other, but neither can be used with
1024 option works for all filesystems, regardless of their xattr
1025 support. The fscontext option sets the overarching filesystem label to a
1026 specific security context. This filesystem label is separate from the
1027 individual labels on the files. It represents the entire filesystem for
1028 certain kinds of permission checks, such as during mount or file creation.
1029 Individual file labels are still obtained from the xattrs on the files
1030 themselves. The context option actually sets the aggregate context that
1031 fscontext provides, in addition to supplying the same label for individual
1034 You can set the default security context for unlabeled files using
1036 option. This overrides the value set for unlabeled files in the policy and requires a
1037 filesystem that supports xattr labeling.
1041 option allows you to explicitly label the root inode of a FS being mounted
1042 before that FS or inode becomes visible to userspace. This was found to be
1043 useful for things like stateless linux.
1045 Note that the kernel rejects any remount request that includes the context
1046 option, \fBeven\fP when unchanged from the current context.
1048 .BR "Warning: the \fIcontext\fP value might contain commas" ,
1049 in which case the value has to be properly quoted, otherwise
1051 will interpret the comma as a separator between mount options. Don't forget that
1052 the shell strips off quotes and thus
1053 .BR "double quoting is required" .
1059 .B mount \-t tmpfs none /mnt \-o \e
1060 .B \ \ 'context="system_u:object_r:tmp_t:s0:c127,c456",noexec'
1064 For more details, see
1070 Use the default options:
1071 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async .
1073 Note that the real set of all default mount options depends on kernel
1074 and filesystem type. See the beginning of this section for more details.
1077 Interpret character or block special devices on the filesystem.
1080 Do not interpret character or block special devices on the file
1084 Update directory inode access times on this filesystem. This is the default.
1085 (This option is ignored when \fBnoatime\fR is set.)
1088 Do not update directory inode access times on this filesystem.
1089 (This option is implied when \fBnoatime\fR is set.)
1092 All directory updates within the filesystem should be done synchronously.
1093 This affects the following system calls: creat, link, unlink, symlink,
1094 mkdir, rmdir, mknod and rename.
1097 Permit execution of binaries.
1100 Do not permit direct execution of any binaries on the mounted filesystem.
1103 Allow an ordinary user to mount the filesystem if one
1104 of that user's groups matches the group of the device.
1105 This option implies the options
1106 .BR nosuid " and " nodev
1107 (unless overridden by subsequent options, as in the option line
1108 .BR group,dev,suid ).
1111 Every time the inode is modified, the i_version field will be incremented.
1114 Do not increment the i_version inode field.
1117 Allow mandatory locks on this filesystem. See
1121 Do not allow mandatory locks on this filesystem.
1124 The filesystem resides on a device that requires network access
1125 (used to prevent the system from attempting to mount these filesystems
1126 until the network has been enabled on the system).
1129 Do not report errors for this device if it does not exist.
1132 Update inode access times relative to modify or change time. Access
1133 time is only updated if the previous access time was earlier than the
1134 current modify or change time. (Similar to \fB\%noatime\fR, but it doesn't
1135 break \fBmutt\fR or other applications that need to know if a file has been
1136 read since the last time it was modified.)
1138 Since Linux 2.6.30, the kernel defaults to the behavior provided by this
1141 was specified), and the
1143 option is required to obtain traditional semantics. In addition, since Linux
1144 2.6.30, the file's last access time is always updated if it is more than 1
1150 feature. See also the
1155 Allows to explicitly request full atime updates. This makes it
1156 possible for the kernel to default to
1160 but still allow userspace to override it. For more details about the default
1161 system mount options see /proc/mounts.
1164 Use the kernel's default behavior for inode access time updates.
1167 Only update times (atime, mtime, ctime) on the in-memory version of the file inode.
1169 This mount option significantly reduces writes to the inode table for
1170 workloads that perform frequent random writes to preallocated files.
1172 The on-disk timestamps are updated only when:
1175 - the inode needs to be updated for some change unrelated to file timestamps
1177 - the application employs
1183 - an undeleted inode is evicted from memory
1185 - more than 24 hours have passed since the i-node was written to disk.
1190 Do not use the lazytime feature.
1193 Honor set-user-ID and set-group-ID bits or file capabilities when
1194 executing programs from this filesystem.
1197 Do not honor set-user-ID and set-group-ID bits or file capabilities when
1198 executing programs from this filesystem.
1201 Turn on the silent flag.
1204 Turn off the silent flag.
1207 Allow an ordinary user to mount the filesystem if that
1208 user is the owner of the device.
1209 This option implies the options
1210 .BR nosuid " and " nodev
1211 (unless overridden by subsequent options, as in the option line
1212 .BR owner,dev,suid ).
1215 Attempt to remount an already-mounted filesystem. This is commonly
1216 used to change the mount flags for a filesystem, especially to make a
1217 readonly filesystem writable. It does not change device or mount point.
1219 The remount operation together with the
1221 flag has special semantic. See above, the subsection \fBBind mounts\fR.
1223 The remount functionality follows the standard way the mount command works
1224 with options from fstab. This means that \fBmount\fR does not
1225 read fstab (or mtab) only when both
1232 .B "mount \-o remount,rw /dev/foo /dir"
1235 After this call all old mount options are replaced and arbitrary stuff from
1236 fstab (or mtab) is ignored, except the loop= option which is internally
1237 generated and maintained by the mount command.
1240 .B "mount \-o remount,rw /dir"
1243 After this call, mount reads fstab and merges these options with
1244 the options from the command line (\fB\-o\fR).
1245 If no mountpoint is found in fstab, then a remount with unspecified source is
1248 mount(8) allows to use \fB\-\-all\fR to remount all already mounted filesystems
1249 which match a specified filter (\fB\-O\fR and \fB\-t\fR). For example:
1252 .B "mount \-\-all \-o remount,ro \-t vfat"
1255 remounts all already mounted vfat filesystems in read-only mode. The each of the
1256 filesystems is remounted by "mount \-o remount,ro /dir" semantic. It means the
1257 mount command reads fstab or mtab and merges these options with the options
1258 from the command line.
1261 Mount the filesystem read-only.
1264 Mount the filesystem read-write.
1267 All I/O to the filesystem should be done synchronously. In the case of
1268 media with a limited number of write cycles
1269 (e.g.\& some flash drives), \fBsync\fR may cause life-cycle shortening.
1272 Allow an ordinary user to mount the filesystem.
1273 The name of the mounting user is written to the mtab file (or to the private
1274 libmount file in /run/mount on systems without a regular mtab) so that this
1275 same user can unmount the filesystem again.
1276 This option implies the options
1277 .BR noexec ", " nosuid ", and " nodev
1278 (unless overridden by subsequent options, as in the option line
1279 .BR user,exec,dev,suid ).
1282 Forbid an ordinary user to mount the filesystem.
1283 This is the default; it does not imply any other options.
1286 Allow any user to mount and to unmount the filesystem, even
1287 when some other ordinary user mounted it.
1288 This option implies the options
1289 .BR noexec ", " nosuid ", and " nodev
1290 (unless overridden by subsequent options, as in the option line
1291 .BR users,exec,dev,suid ).
1294 All options prefixed with "X-" are interpreted as comments or as userspace
1295 application-specific options. These options are not stored in the user space (e.g., mtab file),
1296 nor sent to the mount.\fItype\fR helpers nor to the
1298 system call. The suggested format is \fBX-\fIappname\fR.\fIoption\fR.
1301 The same as \fBX-*\fR options, but stored permanently in the user space. It
1302 means the options are also available for umount or another operations. Note
1303 that maintain mount options in user space is tricky, because it's necessary use
1304 libmount based tools and there is no guarantee that the options will be always
1305 available (for example after a move mount operation or in unshared namespace).
1307 Note that before util-linux v2.30 the x-* options have not been maintained by
1308 libmount and stored in user space (functionality was the same as have X-* now),
1309 but due to growing number of use-cases (in initrd, systemd etc.) the
1310 functionality have been extended to keep existing fstab configurations usable
1313 .BR X-mount.mkdir [ = \fImode\fR ]
1314 Allow to make a target directory (mountpoint) if it does not exit yet.
1315 The optional argument
1317 specifies the filesystem access mode used for
1319 in octal notation. The default mode is 0755. This functionality is supported
1320 only for root users or when mount executed without suid permissions. The option
1321 is also supported as x-mount.mkdir, this notation is deprecated since v2.30.
1323 .SH FILESYSTEM-SPECIFIC MOUNT OPTIONS
1324 You should consult the respective man page for the filesystem first.
1325 If you want to know what options the ext4 filesystem supports, then check the
1328 If that doesn't exist, you can also check the corresponding mount page like
1330 Note that you might have to install the respective userland tools.
1332 The following options apply only to certain filesystems.
1333 We sort them by filesystem. They all follow the
1337 What options are supported depends a bit on the running kernel.
1338 More info may be found in the kernel source subdirectory
1339 .IR Documentation/filesystems .
1341 .SS "Mount options for adfs"
1343 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1344 Set the owner and group of the files in the filesystem (default: uid=gid=0).
1346 \fBownmask=\fP\,\fIvalue\fP and \fBothmask=\fP\,\fIvalue\fP
1347 Set the permission mask for ADFS 'owner' permissions and 'other' permissions,
1348 respectively (default: 0700 and 0077, respectively).
1350 .IR /usr/src/linux/Documentation/filesystems/adfs.rst .
1352 .SS "Mount options for affs"
1354 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1355 Set the owner and group of the root of the filesystem (default: uid=gid=0,
1360 without specified value, the UID and GID of the current process are taken).
1362 \fBsetuid=\fP\,\fIvalue\fP and \fBsetgid=\fP\,\fIvalue\fP
1363 Set the owner and group of all files.
1366 Set the mode of all files to
1368 disregarding the original permissions.
1369 Add search permission to directories that have read permission.
1370 The value is given in octal.
1373 Do not allow any changes to the protection bits on the filesystem.
1376 Set UID and GID of the root of the filesystem to the UID and GID
1377 of the mount point upon the first sync or umount, and then
1378 clear this option. Strange...
1381 Print an informational message for each successful mount.
1384 Prefix used before volume name, when following a link.
1387 Prefix (of length at most 30) used before '/' when following a symbolic link.
1390 (Default: 2.) Number of unused blocks at the start of the device.
1393 Give explicitly the location of the root block.
1396 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
1398 .BR grpquota | noquota | quota | usrquota
1399 These options are accepted but ignored.
1400 (However, quota utilities may react to such strings in
1403 .SS "Mount options for debugfs"
1404 The debugfs filesystem is a pseudo filesystem, traditionally mounted on
1405 .IR /sys/kernel/debug .
1407 .\" present since 2.6.11
1408 As of kernel version 3.4, debugfs has the following options:
1410 .BI uid= n ", gid=" n
1411 Set the owner and group of the mountpoint.
1414 Sets the mode of the mountpoint.
1416 .SS "Mount options for devpts"
1417 The devpts filesystem is a pseudo filesystem, traditionally mounted on
1419 In order to acquire a pseudo terminal, a process opens
1421 the number of the pseudo terminal is then made available to the process
1422 and the pseudo terminal slave can be accessed as
1423 .IR /dev/pts/ <number>.
1425 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1426 This sets the owner or the group of newly created PTYs to
1427 the specified values. When nothing is specified, they will
1428 be set to the UID and GID of the creating process.
1429 For example, if there is a tty group with GID 5, then
1431 will cause newly created PTYs to belong to the tty group.
1434 Set the mode of newly created PTYs to the specified value.
1435 The default is 0600.
1440 makes "mesg y" the default on newly created PTYs.
1443 Create a private instance of devpts filesystem, such that
1444 indices of ptys allocated in this new instance are
1445 independent of indices created in other instances of devpts.
1447 All mounts of devpts without this
1449 option share the same set of pty indices (i.e., legacy mode).
1450 Each mount of devpts with the
1452 option has a private set of pty indices.
1454 This option is mainly used to support containers in the
1455 linux kernel. It is implemented in linux kernel versions
1456 starting with 2.6.29. Further, this mount option is valid
1457 only if CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the
1458 kernel configuration.
1460 To use this option effectively,
1462 must be a symbolic link to
1465 .I Documentation/filesystems/devpts.txt
1466 in the linux kernel source tree for details.
1470 Set the mode for the new
1472 device node in the devpts filesystem.
1474 With the support for multiple instances of devpts (see
1476 option above), each instance has a private
1478 node in the root of the devpts filesystem (typically
1479 .IR /dev/pts/ptmx ).
1481 For compatibility with older versions of the kernel, the
1482 default mode of the new
1486 specifies a more useful mode for the
1488 node and is highly recommended when the
1490 option is specified.
1492 This option is only implemented in linux kernel versions
1493 starting with 2.6.29. Further, this option is valid only if
1494 CONFIG_DEVPTS_MULTIPLE_INSTANCES is enabled in the kernel
1497 .SS "Mount options for fat"
1500 is not a separate filesystem, but a common part of the
1507 .BR blocksize= { 512 | 1024 | 2048 }
1508 Set blocksize (default 512). This option is obsolete.
1510 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1511 Set the owner and group of all files.
1512 (Default: the UID and GID of the current process.)
1515 Set the umask (the bitmask of the permissions that are
1517 present). The default is the umask of the current process.
1518 The value is given in octal.
1521 Set the umask applied to directories only.
1522 The default is the umask of the current process.
1523 The value is given in octal.
1526 Set the umask applied to regular files only.
1527 The default is the umask of the current process.
1528 The value is given in octal.
1530 .BI allow_utime= value
1531 This option controls the permission check of mtime/atime.
1535 If current process is in group of file's group ID, you can change timestamp.
1538 Other users can change timestamp.
1540 The default is set from `dmask' option. (If the directory is writable,
1542 is also allowed. I.e.\& \s+3~\s0dmask & 022)
1546 checks current process is owner of the file, or it has
1547 CAP_FOWNER capability. But FAT filesystem doesn't have UID/GID on disk, so
1548 normal check is too inflexible. With this option you can relax it.
1552 Three different levels of pickiness can be chosen:
1556 Upper and lower case are accepted and equivalent, long name parts are
1558 .I verylongname.foobar
1561 leading and embedded spaces are accepted in each name part (name and extension).
1564 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
1565 rejected. This is the default.
1568 Like "normal", but names that contain long parts or special characters
1569 that are sometimes used on Linux but are not accepted by MS-DOS
1570 (+, =, etc.) are rejected.
1574 Sets the codepage for converting to shortname characters on FAT
1575 and VFAT filesystems. By default, codepage 437 is used.
1578 This option is obsolete and may fail or being ignored.
1580 .BI cvf_format= module
1581 Forces the driver to use the CVF (Compressed Volume File) module
1583 instead of auto-detection. If the kernel supports kmod, the
1584 cvf_format=xxx option also controls on-demand CVF module loading.
1585 This option is obsolete.
1587 .BI cvf_option= option
1588 Option passed to the CVF module. This option is obsolete.
1593 flag. A version string and a list of filesystem parameters will be
1594 printed (these data are also printed if the parameters appear to be
1598 If set, causes discard/TRIM commands to be issued to the block device
1599 when blocks are freed. This is useful for SSD devices and
1600 sparse/thinly-provisioned LUNs.
1603 If set, use a fallback default BIOS Parameter Block configuration, determined
1604 by backing device size. These static parameters match defaults assumed by DOS
1605 1.x for 160 kiB, 180 kiB, 320 kiB, and 360 kiB floppies and floppy images.
1607 .BR errors= { panic | continue | remount-ro }
1608 Specify FAT behavior on critical errors: panic, continue without doing
1609 anything, or remount the partition in read-only mode (default behavior).
1611 .BR fat= { 12 | 16 | 32 }
1612 Specify a 12, 16 or 32 bit fat. This overrides
1613 the automatic FAT type detection routine. Use with caution!
1615 .BI iocharset= value
1616 Character set to use for converting between 8 bit characters
1617 and 16 bit Unicode characters. The default is iso8859-1.
1618 Long filenames are stored on disk in Unicode format.
1620 .BR nfs= { stale_rw | nostale_ro }
1621 Enable this only if you want to export the FAT filesystem over NFS.
1624 This option maintains an index (cache) of directory inodes which is used by the
1625 nfs-related code to improve look-ups. Full file operations (read/write) over
1626 NFS are supported but with cache eviction at NFS server, this could result in
1632 This option bases the inode number and file handle
1633 on the on-disk location of a file in the FAT directory entry.
1636 will not be returned after a file is
1637 evicted from the inode cache. However, it means that operations
1638 such as rename, create and unlink could cause file handles that
1639 previously pointed at one file to point at a different file,
1640 potentially causing data corruption. For this reason, this
1641 option also mounts the filesystem readonly.
1643 To maintain backward compatibility, '\-o nfs' is also accepted,
1648 This option disables the conversion of timestamps
1649 between local time (as used by Windows on FAT) and UTC
1650 (which Linux uses internally). This is particularly
1651 useful when mounting devices (like digital cameras)
1652 that are set to UTC in order to avoid the pitfalls of
1655 .BI time_offset= minutes
1656 Set offset for conversion of timestamps from local time used by FAT to UTC.
1659 will be subtracted from each timestamp to convert it to UTC used
1660 internally by Linux. This is useful when the time zone set in the kernel via
1661 .BR settimeofday (2)
1662 is not the time zone used by the filesystem. Note
1663 that this option still does not provide correct time stamps in all cases in
1664 presence of DST - time stamps in a different DST setting will be off by one
1670 flag. Attempts to chown or chmod files do not return errors,
1671 although they fail. Use with caution!
1674 FAT has the ATTR_RO (read-only) attribute. On Windows, the ATTR_RO of the
1675 directory will just be ignored, and is used only by applications as a flag
1676 (e.g.\& it's set for the customized folder).
1678 If you want to use ATTR_RO as read-only flag even for the directory, set this
1682 If set, the execute permission bits of the file will be allowed only if
1683 the extension part of the name is \&.EXE, \&.COM, or \&.BAT. Not set by default.
1686 If set, ATTR_SYS attribute on FAT is handled as IMMUTABLE flag on Linux.
1690 If set, the filesystem will try to flush to disk more early than normal.
1694 Use the "free clusters" value stored on FSINFO. It'll
1695 be used to determine number of free clusters without
1696 scanning disk. But it's not used by default, because
1697 recent Windows don't update it correctly in some
1698 case. If you are sure the "free clusters" on FSINFO is
1699 correct, by this option you can avoid scanning disk.
1701 .BR dots ", " nodots ", " dotsOK= [ yes | no ]
1702 Various misguided attempts to force Unix or DOS conventions
1703 onto a FAT filesystem.
1705 .SS "Mount options for hfs"
1707 .BI creator= cccc ", type=" cccc
1708 Set the creator/type values as shown by the MacOS finder
1709 used for creating new files. Default values: '????'.
1711 .BI uid= n ", gid=" n
1712 Set the owner and group of all files.
1713 (Default: the UID and GID of the current process.)
1715 .BI dir_umask= n ", file_umask=" n ", umask=" n
1716 Set the umask used for all directories, all regular files, or all
1717 files and directories. Defaults to the umask of the current process.
1720 Select the CDROM session to mount.
1721 Defaults to leaving that decision to the CDROM driver.
1722 This option will fail with anything but a CDROM as underlying device.
1725 Select partition number n from the device.
1726 Only makes sense for CDROMs.
1727 Defaults to not parsing the partition table at all.
1730 Don't complain about invalid mount options.
1732 .SS "Mount options for hpfs"
1734 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1735 Set the owner and group of all files. (Default: the UID and GID
1736 of the current process.)
1739 Set the umask (the bitmask of the permissions that are
1741 present). The default is the umask of the current process.
1742 The value is given in octal.
1744 .BR case= { lower | asis }
1745 Convert all files names to lower case, or leave them.
1750 This option is obsolete and may fail or being ignored.
1753 Do not abort mounting when certain consistency checks fail.
1755 .SS "Mount options for iso9660"
1756 ISO 9660 is a standard describing a filesystem structure to be used
1757 on CD-ROMs. (This filesystem type is also seen on some DVDs. See also the
1763 filenames appear in an 8.3 format (i.e., DOS-like restrictions on filename
1764 length), and in addition all characters are in upper case. Also there is
1765 no field for file ownership, protection, number of links, provision for
1766 block/character devices, etc.
1768 Rock Ridge is an extension to iso9660 that provides all of these UNIX-like
1769 features. Basically there are extensions to each directory record that
1770 supply all of the additional information, and when Rock Ridge is in use,
1771 the filesystem is indistinguishable from a normal UNIX filesystem (except
1772 that it is read-only, of course).
1775 Disable the use of Rock Ridge extensions, even if available. Cf.\&
1779 Disable the use of Microsoft Joliet extensions, even if available. Cf.\&
1782 .BR check= { r [ elaxed ]| s [ trict ]}
1785 a filename is first converted to lower case before doing the lookup.
1786 This is probably only meaningful together with
1793 \fBuid=\fP\,\fIvalue\fP and \fBgid=\fP\,\fIvalue\fP
1794 Give all files in the filesystem the indicated user or group id,
1795 possibly overriding the information found in the Rock Ridge extensions.
1799 .BR map= { n [ ormal ]| o [ ff ]| a [ corn ]}
1800 For non-Rock Ridge volumes, normal name translation maps upper
1801 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
1804 no name translation is done. See
1811 but also apply Acorn extensions if present.
1814 For non-Rock Ridge volumes, give all files the indicated mode.
1815 (Default: read and execute permission for everybody.)
1816 Octal mode values require a leading 0.
1819 Also show hidden and associated files.
1820 (If the ordinary files and the associated or hidden files have
1821 the same filenames, this may make the ordinary files inaccessible.)
1823 .BR block= { 512 | 1024 | 2048 }
1824 Set the block size to the indicated value.
1829 This option is obsolete and may fail or being ignored.
1832 If the high byte of the file length contains other garbage,
1833 set this mount option to ignore the high order bits of the file length.
1834 This implies that a file cannot be larger than 16\ MB.
1837 Select number of session on multisession CD.
1840 Session begins from sector xxx.
1842 The following options are the same as for vfat and specifying them only makes
1843 sense when using discs encoded using Microsoft's Joliet extensions.
1845 .BI iocharset= value
1846 Character set to use for converting 16 bit Unicode characters on CD
1847 to 8 bit characters. The default is iso8859-1.
1850 Convert 16 bit Unicode characters on CD to UTF-8.
1852 .SS "Mount options for jfs"
1855 Character set to use for converting from Unicode to ASCII. The default is
1856 to do no conversion. Use
1858 for UTF8 translations. This requires CONFIG_NLS_UTF8 to be set in
1864 Resize the volume to
1866 blocks. JFS only supports growing a volume, not shrinking it. This option
1867 is only valid during a remount, when the volume is mounted read-write. The
1869 keyword with no value will grow the volume to the full size of the partition.
1872 Do not write to the journal. The primary use of this option is to allow
1873 for higher performance when restoring a volume from backup media. The
1874 integrity of the volume is not guaranteed if the system abnormally ends.
1877 Default. Commit metadata changes to the journal. Use this option to remount
1880 option was previously specified in order to restore normal behavior.
1882 .BR errors= { continue | remount-ro | panic }
1883 Define the behavior when an error is encountered.
1884 (Either ignore errors and just mark the filesystem erroneous and continue,
1885 or remount the filesystem read-only, or panic and halt the system.)
1887 .BR noquota | quota | usrquota | grpquota
1888 These options are accepted but ignored.
1890 .SS "Mount options for msdos"
1891 See mount options for fat.
1894 filesystem detects an inconsistency, it reports an error and sets the file
1895 system read-only. The filesystem can be made writable again by remounting
1898 .SS "Mount options for ncpfs"
1900 .IR nfs ", the " ncpfs
1901 implementation expects a binary argument (a
1902 .IR "struct ncp_mount_data" )
1903 to the mount system call. This argument is constructed by
1905 and the current version of
1907 (2.12) does not know anything about ncpfs.
1909 .SS "Mount options for ntfs"
1912 Character set to use when returning file names.
1913 Unlike VFAT, NTFS suppresses names that contain
1914 nonconvertible characters. Deprecated.
1917 New name for the option earlier called
1921 Use UTF-8 for converting file names.
1923 .BR uni_xlate= { 0 | 1 | 2 }
1924 For 0 (or `no' or `false'), do not use escape sequences
1925 for unknown Unicode characters.
1926 For 1 (or `yes' or `true') or 2, use vfat-style 4-byte escape sequences
1927 starting with ":". Here 2 give a little-endian encoding
1928 and 1 a byteswapped bigendian encoding.
1931 If enabled (posix=1), the filesystem distinguishes between
1932 upper and lower case. The 8.3 alias names are presented as
1933 hard links instead of being suppressed. This option is obsolete.
1935 \fBuid=\fP\,\fIvalue\fP, \fBgid=\fP\,\fIvalue\fP and \fBumask=\fP\,\fIvalue\fP
1936 Set the file permission on the filesystem.
1937 The umask value is given in octal.
1938 By default, the files are owned by root and not readable by somebody else.
1940 .SS "Mount options for overlay"
1941 Since Linux 3.18 the overlay pseudo filesystem implements a union mount for
1944 An overlay filesystem combines two filesystems - an \fBupper\fR filesystem and
1945 a \fBlower\fR filesystem. When a name exists in both filesystems, the object
1946 in the upper filesystem is visible while the object in the lower filesystem is
1947 either hidden or, in the case of directories, merged with the upper object.
1949 The lower filesystem can be any filesystem supported by Linux and does not need
1950 to be writable. The lower filesystem can even be another overlayfs. The upper
1951 filesystem will normally be writable and if it is it must support the creation
1952 of trusted.* extended attributes, and must provide a valid d_type in readdir
1953 responses, so NFS is not suitable.
1955 A read-only overlay of two read-only filesystems may use any filesystem type.
1956 The options \fBlowerdir\fR and \fBupperdir\fR are combined into a merged
1962 .B "mount \-t overlay overlay \e"
1963 .B " \-olowerdir=/lower,upperdir=/upper,workdir=/work /merged"
1969 .BI lowerdir= directory
1970 Any filesystem, does not need to be on a writable filesystem.
1972 .BI upperdir= directory
1973 The upperdir is normally on a writable filesystem.
1975 .BI workdir= directory
1976 The workdir needs to be an empty directory on the same filesystem as upperdir.
1978 .SS "Mount options for reiserfs"
1979 Reiserfs is a journaling filesystem.
1982 Instructs version 3.6 reiserfs software to mount a version 3.5 filesystem,
1983 using the 3.6 format for newly created objects. This filesystem will no
1984 longer be compatible with reiserfs 3.5 tools.
1986 .BR hash= { rupasov | tea | r5 | detect }
1987 Choose which hash function reiserfs will use to find files within directories.
1991 A hash invented by Yury Yu.\& Rupasov. It is fast and preserves locality,
1992 mapping lexicographically close file names to close hash values.
1993 This option should not be used, as it causes a high probability of hash
1997 A Davis-Meyer function implemented by Jeremy Fitzhardinge.
1998 It uses hash permuting bits in the name. It gets high randomness
1999 and, therefore, low probability of hash collisions at some CPU cost.
2000 This may be used if EHASHCOLLISION errors are experienced with the r5 hash.
2003 A modified version of the rupasov hash. It is used by default and is
2004 the best choice unless the filesystem has huge directories and
2005 unusual file-name patterns.
2010 to detect which hash function is in use by examining
2011 the filesystem being mounted, and to write this information into
2012 the reiserfs superblock. This is only useful on the first mount of
2013 an old format filesystem.
2016 .B hashed_relocation
2017 Tunes the block allocator. This may provide performance improvements
2020 .B no_unhashed_relocation
2021 Tunes the block allocator. This may provide performance improvements
2025 Disable the border allocator algorithm invented by Yury Yu.\& Rupasov.
2026 This may provide performance improvements in some situations.
2029 Disable journaling. This will provide slight performance improvements in
2030 some situations at the cost of losing reiserfs's fast recovery from crashes.
2031 Even with this option turned on, reiserfs still performs all journaling
2032 operations, save for actual writes into its journaling area. Implementation
2035 is a work in progress.
2038 By default, reiserfs stores small files and `file tails' directly into its
2039 tree. This confuses some utilities such as
2041 This option is used to disable packing of files into the tree.
2044 Replay the transactions which are in the journal, but do not actually
2045 mount the filesystem. Mainly used by
2049 A remount option which permits online expansion of reiserfs partitions.
2050 Instructs reiserfs to assume that the device has
2053 This option is designed for use with devices which are under logical
2054 volume management (LVM).
2057 utility which can be obtained from
2058 .IR ftp://ftp.namesys.com/pub/reiserfsprogs .
2061 Enable Extended User Attributes. See the
2066 Enable POSIX Access Control Lists. See the
2070 .BR barrier=none " / " barrier=flush "
2071 This disables / enables the use of write barriers in the journaling code.
2072 barrier=none disables, barrier=flush enables (default). This also requires an
2073 IO stack which can support barriers, and if reiserfs gets an error on a barrier
2074 write, it will disable barriers again with a warning. Write barriers enforce
2075 proper on-disk ordering of journal commits, making volatile disk write caches
2076 safe to use, at some performance penalty. If your disks are battery-backed in
2077 one way or another, disabling barriers may safely improve performance.
2079 .SS "Mount options for ubifs"
2080 UBIFS is a flash filesystem which works on top of UBI volumes. Note that
2081 \fBatime\fR is not supported and is always turned off.
2083 The device name may be specified as
2111 separator may be used instead of
2114 The following mount options are available:
2117 Enable bulk-read. VFS read-ahead is disabled because it slows down the file
2118 system. Bulk-Read is an internal optimization. Some flashes may read faster if
2119 the data are read at one go, rather than at several read requests. For
2120 example, OneNAND can do "read-while-load" if it reads more than one NAND page.
2123 Do not bulk-read. This is the default.
2126 Check data CRC-32 checksums. This is the default.
2128 .BR no_chk_data_crc .
2129 Do not check data CRC-32 checksums. With this option, the filesystem does not
2130 check CRC-32 checksum for data, but it does check it for the internal indexing
2131 information. This option only affects reading, not writing. CRC-32 is always
2132 calculated when writing the data.
2134 .BR compr= { none | lzo | zlib }
2135 Select the default compressor which is used when new files are written. It is
2136 still possible to read compressed files if mounted with the
2140 .SS "Mount options for udf"
2141 UDF is the "Universal Disk Format" filesystem defined by OSTA, the Optical
2142 Storage Technology Association, and is often used for DVD-ROM, frequently
2143 in the form of a hybrid UDF/ISO-9660 filesystem. It is, however,
2144 perfectly usable by itself on disk drives, flash drives and other block devices.
2149 Make all files in the filesystem belong to the given user.
2150 uid=forget can be specified independently of (or usually in
2151 addition to) uid=<user> and results in UDF
2152 not storing uids to the media. In fact the recorded uid
2153 is the 32-bit overflow uid \-1 as defined by the UDF standard.
2154 The value is given as either <user> which is a valid user name or the corresponding
2155 decimal user id, or the special string "forget".
2158 Make all files in the filesystem belong to the given group.
2159 gid=forget can be specified independently of (or usually in
2160 addition to) gid=<group> and results in UDF
2161 not storing gids to the media. In fact the recorded gid
2162 is the 32-bit overflow gid \-1 as defined by the UDF standard.
2163 The value is given as either <group> which is a valid group name or the corresponding
2164 decimal group id, or the special string "forget".
2167 Mask out the given permissions from all inodes read from the filesystem.
2168 The value is given in octal.
2171 If mode= is set the permissions of all non-directory inodes read from the
2172 filesystem will be set to the given mode. The value is given in octal.
2175 If dmode= is set the permissions of all directory inodes read from the
2176 filesystem will be set to the given dmode. The value is given in octal.
2179 Set the block size. Default value prior to kernel version 2.6.30 was
2180 2048. Since 2.6.30 and prior to 4.11 it was logical device block size with
2181 fallback to 2048. Since 4.11 it is logical block size with fallback to
2182 any valid block size between logical device block size and 4096.
2184 For other details see the \fBmkudffs\fP(8) 2.0+ manpage, sections
2185 \fBCOMPATIBILITY\fP and \fBBLOCK SIZE\fP.
2188 Show otherwise hidden files.
2191 Show deleted files in lists.
2194 Embed data in the inode. (default)
2197 Don't embed data in the inode.
2200 Use short UDF address descriptors.
2203 Use long UDF address descriptors. (default)
2206 Unset strict conformance.
2209 Set the NLS character set. This requires kernel compiled with CONFIG_UDF_NLS option.
2212 Set the UTF-8 character set.
2213 .SS Mount options for debugging and disaster recovery
2216 Ignore the Volume Recognition Sequence and attempt to mount anyway.
2219 Select the session number for multi-session recorded optical media. (default= last session)
2222 Override standard anchor location. (default= 256)
2225 Set the last block of the filesystem.
2226 .SS Unused historical mount options that may be encountered and should be removed
2229 Ignored, use uid=<user> instead.
2232 Ignored, use gid=<group> instead.
2235 Unimplemented and ignored.
2238 Unimplemented and ignored.
2241 Unimplemented and ignored.
2244 Unimplemented and ignored.
2246 .SS "Mount options for ufs"
2249 UFS is a filesystem widely used in different operating systems.
2250 The problem are differences among implementations. Features of some
2251 implementations are undocumented, so its hard to recognize the
2252 type of ufs automatically.
2253 That's why the user must specify the type of ufs by mount option.
2254 Possible values are:
2258 Old format of ufs, this is the default, read only.
2259 (Don't forget to give the \-r option.)
2262 For filesystems created by a BSD-like system (NetBSD, FreeBSD, OpenBSD).
2265 Used in FreeBSD 5.x supported as read-write.
2271 For filesystems created by SunOS or Solaris on Sparc.
2274 For filesystems created by Solaris on x86.
2277 For filesystems created by HP-UX, read-only.
2280 For filesystems created by NeXTStep (on NeXT station) (currently read only).
2283 For NextStep CDROMs (block_size == 2048), read-only.
2286 For filesystems created by OpenStep (currently read only).
2287 The same filesystem type is also used by Mac OS X.
2292 Set behavior on error:
2296 If an error is encountered, cause a kernel panic.
2298 .RB [ lock | umount | repair ]
2299 These mount options don't do anything at present;
2300 when an error is encountered only a console message is printed.
2303 .SS "Mount options for umsdos"
2304 See mount options for msdos.
2307 option is explicitly killed by
2310 .SS "Mount options for vfat"
2311 First of all, the mount options for
2316 option is explicitly killed by
2318 Furthermore, there are
2321 Translate unhandled Unicode characters to special escaped sequences.
2322 This lets you backup and restore filenames that are created with any
2323 Unicode characters. Without this option, a '?' is used when no
2324 translation is possible. The escape character is ':' because it is
2325 otherwise invalid on the vfat filesystem. The escape sequence
2326 that gets used, where u is the Unicode character,
2327 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
2330 Allow two files with names that only differ in case.
2331 This option is obsolete.
2334 First try to make a short name without sequence number,
2336 .IR name\s+3~\s0num.ext .
2339 UTF8 is the filesystem safe 8-bit encoding of Unicode that is used by the
2340 console. It can be enabled for the filesystem with this option or disabled
2341 with utf8=0, utf8=no or utf8=false. If `uni_xlate' gets set, UTF8 gets
2345 Defines the behavior for creation and display of filenames which fit into
2346 8.3 characters. If a long name for a file exists, it will always be the
2347 preferred one for display. There are four \fImode\fRs:
2351 Force the short name to lower case upon display; store a long name when
2352 the short name is not all upper case.
2355 Force the short name to upper case upon display; store a long name when
2356 the short name is not all upper case.
2359 Display the short name as is; store a long name when the short name is
2360 not all lower case or all upper case.
2363 Display the short name as is; store a long name when the short name is not
2364 all upper case. This mode is the default since Linux 2.6.32.
2367 .SS "Mount options for usbfs"
2369 \fBdevuid=\fP\,\fIuid\fP and \fBdevgid=\fP\,\fIgid\fP and \fBdevmode=\fP\,\fImode\fP
2370 Set the owner and group and mode of the device files in the usbfs filesystem
2371 (default: uid=gid=0, mode=0644). The mode is given in octal.
2373 \fBbusuid=\fP\,\fIuid\fP and \fBbusgid=\fP\,\fIgid\fP and \fBbusmode=\fP\,\fImode\fP
2374 Set the owner and group and mode of the bus directories in the usbfs
2375 filesystem (default: uid=gid=0, mode=0555). The mode is given in octal.
2377 \fBlistuid=\fP\,\fIuid\fP and \fBlistgid=\fP\,\fIgid\fP and \fBlistmode=\fP\,\fImode\fP
2378 Set the owner and group and mode of the file
2380 (default: uid=gid=0, mode=0444). The mode is given in octal.
2382 .SH DM-VERITY SUPPORT (experimental)
2383 The device-mapper verity target provides read-only transparent integrity
2384 checking of block devices using kernel crypto API. The mount command can open
2385 the dm-verity device and do the integrity verification before on the device
2386 filesystem is mounted. Requires libcryptsetup with in libmount. If
2387 libcryptsetup supports extracting the root hash of an already mounted device,
2388 existing devices will be automatically reused in case of a match.
2389 Mount options for dm-verity:
2391 \fBverity.hashdevice=\fP\,\fIpath\fP
2392 Path to the hash tree device associated with the source volume to pass to dm-verity.
2394 \fBverity.roothash=\fP\,\fIhex\fP
2395 Hex-encoded hash of the root of
2396 .I verity.hashdevice
2397 Mutually exclusive with
2398 .I verity.roothashfile.
2400 \fBverity.roothashfile=\fP\,\fIpath\fP
2401 Path to file containing the hex-encoded hash of the root of
2402 .I verity.hashdevice.
2403 Mutually exclusive with
2406 \fBverity.hashoffset=\fP\,\fIoffset\fP
2407 If the hash tree device is embedded in the source volume,
2409 (default: 0) is used by dm-verity to get to the tree.
2411 \fBverity.fecdevice=\fP\,\fIpath\fP
2412 Path to the Forward Error Correction (FEC) device associated with the source volume to pass to dm-verity.
2413 Optional. Requires kernel built with CONFIG_DM_VERITY_FEC.
2415 \fBverity.fecoffset=\fP\,\fIoffset\fP
2416 If the FEC device is embedded in the source volume,
2418 (default: 0) is used by dm-verity to get to the FEC area. Optional.
2420 \fBverity.fecroots=\fP\,\fIvalue\fP
2421 Parity bytes for FEC (default: 2). Optional.
2423 \fBverity.roothashsig=\fP\,\fIpath\fP
2424 Path to pkcs7 signature of root hash hex string. Requires crypt_activate_by_signed_key() from cryptsetup and
2425 kernel built with CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG. For device reuse, signatures have to be either used by all
2426 mounts of a device or by none. Optional.
2428 Supported since util-linux v2.35.
2430 For example commands:
2434 .B mksquashfs /etc /tmp/etc.squashfs
2435 .B dd if=/dev/zero of=/tmp/etc.hash bs=1M count=10
2436 .B veritysetup format /tmp/etc.squashfs /tmp/etc.hash
2437 .B openssl smime \-sign \-in <hash> \-nocerts \-inkey private.key \-signer private.crt \-noattr \-binary \-outform der \-out /tmp/etc.p7
2438 .B mount \-o verity.hashdevice=/tmp/etc.hash,verity.roothash=<hash>,verity.roothashsig=/tmp/etc.p7 /tmp/etc.squashfs /mnt
2442 create squashfs image from /etc directory, verity hash device
2443 and mount verified filesystem image to /mnt.
2444 The kernel will verify that the root hash is signed by a key from the kernel keyring if roothashsig is used.
2446 .SH LOOP-DEVICE SUPPORT
2447 One further possible type is a mount via the loop device. For example,
2451 .B "mount /tmp/disk.img /mnt \-t vfat \-o loop=/dev/loop3"
2454 will set up the loop device
2456 to correspond to the file
2458 and then mount this device on
2461 If no explicit loop device is mentioned
2462 (but just an option `\fB\-o loop\fP' is given), then
2464 will try to find some unused loop device and use that, for example
2467 .B "mount /tmp/disk.img /mnt \-o loop"
2472 creates a loop device from a regular file if a filesystem type is
2473 not specified or the filesystem is known for libblkid, for example:
2476 .B "mount /tmp/disk.img /mnt"
2478 .B "mount \-t ext4 /tmp/disk.img /mnt"
2481 This type of mount knows about three options, namely
2482 .BR loop ", " offset " and " sizelimit ,
2483 that are really options to
2485 (These options can be used in addition to those specific
2486 to the filesystem type.)
2488 Since Linux 2.6.25 auto-destruction of loop devices is supported,
2489 meaning that any loop device allocated by
2496 You can also free a loop device by hand, using
2497 .BR "losetup \-d " or " umount \-d" .
2499 Since util-linux v2.29 mount command re-uses the loop device rather than
2500 initialize a new device if the same backing file is already used for some loop
2501 device with the same offset and sizelimit. This is necessary to avoid
2502 a filesystem corruption.
2506 has the following return codes (the bits can be ORed):
2512 incorrect invocation or permissions
2515 system error (out of memory, cannot fork, no more loop devices)
2526 problems writing or locking /etc/mtab
2532 some mount succeeded
2534 The command \fBmount \-a\fR returns 0 (all succeeded), 32 (all failed), or 64 (some
2535 failed, some succeeded).
2537 .SH EXTERNAL HELPERS
2538 The syntax of external mount helpers is:
2541 .BI /sbin/mount. suffix
2549 .IR type \fB. subtype ]
2552 where the \fIsuffix\fR is the filesystem type and the \fB\-sfnvoN\fR options have
2553 the same meaning as the normal mount options. The \fB\-t\fR option is used for
2554 filesystems with subtypes support (for example
2555 .BR "/sbin/mount.fuse \-t fuse.sshfs" ).
2557 The command \fBmount\fR does not pass the mount options
2574 to the mount.<suffix> helpers. All other options are used in a
2575 comma-separated list as argument to the \fB\-o\fR option.
2578 See also "\fBThe files /etc/fstab, /etc/mtab and /proc/mounts\fR" section above.
2584 libmount private runtime directory
2587 table of mounted filesystems or symlink to /proc/mounts
2589 .I /etc/mtab\s+3~\s0
2590 lock file (unused on systems with mtab symlink)
2593 temporary file (unused on systems with mtab symlink)
2596 a list of filesystem types to try
2598 .IP LIBMOUNT_FSTAB=<path>
2599 overrides the default location of the fstab file (ignored for suid)
2600 .IP LIBMOUNT_MTAB=<path>
2601 overrides the default location of the mtab file (ignored for suid)
2602 .IP LIBMOUNT_DEBUG=all
2603 enables libmount debug output
2604 .IP LIBBLKID_DEBUG=all
2605 enables libblkid debug output
2606 .IP LOOPDEV_DEBUG=all
2607 enables loop device setup debug output
2627 It is possible for a corrupted filesystem to cause a crash.
2629 Some Linux filesystems don't support
2630 .BR "\-o sync " nor " \-o dirsync"
2631 (the ext2, ext3, ext4, fat and vfat filesystems
2633 support synchronous updates (a la BSD) when mounted with the
2639 may not be able to change mount parameters (all
2640 .IR ext2fs -specific
2643 are changeable with a remount, for example, but you can't change
2650 It is possible that the files
2654 don't match on systems with a regular mtab file. The first file is based only on
2655 the mount command options, but the content of the second file also depends on
2656 the kernel and others settings (e.g.\& on a remote NFS server -- in certain cases
2657 the mount command may report unreliable information about an NFS mount point
2658 and the /proc/mounts file usually contains more reliable information.) This is
2659 another reason to replace the mtab file with a symlink to the
2663 Checking files on NFS filesystems referenced by file descriptors (i.e.\& the
2667 families of functions) may lead to inconsistent results due to the lack of
2668 a consistency check in the kernel even if noac is used.
2676 options used may fail when using older kernels if the
2678 command can't confirm that the size of the block device has been configured
2679 as requested. This situation can be worked around by using
2682 command manually before calling
2684 with the configured loop device.
2688 command existed in Version 5 AT&T UNIX.
2691 Karel Zak <kzak@redhat.com>
2694 The mount command is part of the util-linux package and is available from
2695 https://www.kernel.org/pub/linux/utils/util-linux/.