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