1 .\" Copyright (c) 1996 Andries Brouwer
3 .\" This page is somewhat derived from a page that was
4 .\" (c) 1980, 1989, 1991 The Regents of the University of California
5 .\" and had been heavily modified by Rik Faith and myself.
6 .\" (Probably no BSD text remains.)
7 .\" Fragments of text were written by Werner Almesberger, Remy Card,
8 .\" Stephen Tweedie and Eric Youngdale.
10 .\" This is free documentation; you can redistribute it and/or
11 .\" modify it under the terms of the GNU General Public License as
12 .\" published by the Free Software Foundation; either version 2 of
13 .\" the License, or (at your option) any later version.
15 .\" The GNU General Public License's references to "object code"
16 .\" and "executables" are to be interpreted as the output of any
17 .\" document formatting or typesetting system, including
18 .\" intermediate and printed output.
20 .\" This manual is distributed in the hope that it will be useful,
21 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
22 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 .\" GNU General Public License for more details.
25 .\" You should have received a copy of the GNU General Public
26 .\" License along with this manual; if not, write to the Free
27 .\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
30 .\" 960705, aeb: version for mount-2.7g
31 .\" 970114, aeb: xiafs and ext are dead; romfs is new
32 .\" 970623, aeb: -F option
33 .\" 970914, reg: -s option
34 .\" 981111, K.Garloff: /etc/filesystems
35 .\" 990111, aeb: documented /sbin/mount.smbfs
37 .TH MOUNT 8 "14 September 1997" "Linux 2.0" "Linux Programmer's Manual"
39 mount \- mount a file system
43 .BI "mount \-a [\-fFnrsvw] [\-t " vfstype ]
45 .BI "mount [\-fnrsvw] [\-o " options " [,...]] " "device " | " dir"
47 .BI "mount [\-fnrsvw] [\-t " vfstype "] [\-o " options "] " "device dir"
49 All files accessible in a Unix system are arranged in one big
50 tree, the file hierarchy, rooted at
52 These files can be spread out over several devices. The
54 command serves to attach the file system found on some device
55 to the big file tree. Conversely, the
57 command will detach it again.
59 The standard form of the
64 .BI "mount \-t" " type device dir"
66 This tells the kernel to attach the file system found on
72 The previous contents (if any) and owner and mode of
74 become invisible, and as long as this file system remains mounted,
77 refers to the root of the file system on
80 Three forms of invocation do not actually mount anything:
85 prints a help message;
90 prints a version string; and just
92 .BI "mount [-t" " type" ]
94 lists all mounted file systems (of type
100 file system is not associated with a special device, and when
101 mounting it, an arbitrary keyword, such as
103 can be used instead of a device specification.
104 (The customary choice
106 is less fortunate: the error message `none busy' from
110 Most devices are indicated by a file name (of a block special device), like
112 but there are other possibilities. For example, in the case of an NFS mount,
115 .IR knuth.cwi.nl:/dir .
116 It is possible to indicate a block special device using its
117 volume label or UUID (see the \-L and \-U options below).
123 may contain lines describing what devices are usually
124 mounted where, using which options. This file is used in three ways:
129 .BI "mount \-a [-t" " type" ]
131 (usually given in a bootscript) causes all file systems mentioned in
133 (of the proper type) to be mounted as indicated, except for those
134 whose line contains the
138 option will make mount fork, so that the
139 filesystems are mounted simultaneously.
141 (ii) When mounting a file system mentioned in
143 it suffices to give only the device, or only the mount point.
145 (iii) Normally, only the superuser can mount file systems.
150 option on a line, then anybody can mount the corresponding system.
155 .B "/dev/cdrom /cd iso9660 ro,user,noauto,unhide"
157 any user can mount the iso9660 file system found on his CDROM
161 .B "mount /dev/cdrom"
168 For more details, see
170 Only the user that mounted a filesystem can unmount it again.
171 If any user should be able to unmount, then use
183 maintain a list of currently mounted file systems in the file
185 If no arguments are given to
187 this list is printed.
190 filesystem is mounted (say at
196 have very similar contents. The former has somewhat
197 more information, such as the mount options used,
198 but is not necessarily up-to-date (cf. the
200 option below). It is possible to replace
202 by a symbolic link to
204 but some information is lost that way, and in particular
205 working with the loop device will be less convenient.
208 The full set of options used by an invocation of
210 is determined by first extracting the
211 options for the file system from the
213 table, then applying any options specified by the
215 argument, and finally applying a
217 option, when present.
219 Options available for the
227 Print a help message.
233 Mount all filesystems (of the given types) mentioned in
237 (Used in conjunction with
239 Fork off a new incarnation of mount for each device.
240 This will do the mounts on different devices or different NFS servers
242 This has the advantage that it is faster; also NFS timeouts go in
243 parallel. A disadvantage is that the mounts are done in undefined order.
244 Thus, you cannot use this option if you want to mount both
250 Causes everything to be done except for the actual system call; if it's not
251 obvious, this ``fakes'' mounting the file system. This option is useful in
254 flag to determine what the
256 command is trying to do. It can also be used to add entries for devices
257 that were mounted earlier with the -n option.
260 Mount without writing in
262 This is necessary for example when
264 is on a read-only file system.
267 Tolerate sloppy mount options rather than failing. This will ignore
268 mount options not supported by a filesystem type. Not all filesystems
269 support this option. This option exists for support of the Linux
270 autofs\-based automounter.
273 Mount the file system read-only. A synonym is
277 Mount the file system read/write. This is the default. A synonym is
281 Mount the partition that has the specified
285 Mount the partition that has the specified
287 These two options require the file
289 (present since Linux 2.1.116) to exist.
292 The argument following the
294 is used to indicate the file system type. The file system types which are
295 currently supported are listed in
296 .IR linux/fs/filesystems.c :
320 .IR sysv ", " xenix ", " coherent .
321 Note that the last three are equivalent and that
325 will be removed at some point in the future \(em use
327 instead. Since kernel version 2.1.21 the types
331 do not exist anymore.
333 For most types all the
335 program has to do is issue a simple
337 system call, and no detailed knowledge of the filesystem type is required.
338 For a few types however (like nfs, smbfs, ncpfs) ad hoc code is
339 necessary. The nfs ad hoc code is built in, but smbfs and ncpfs
340 have a separate mount program. In order to make it possible to
341 treat all types in a uniform way, mount will execute the program
343 (if that exists) when called with type smb or ncp.
344 Since various versions of the
346 program have different calling conventions,
348 may have to be a shell script that sets up the desired call.
352 is the default. If no
354 option is given, or if the
356 type is specified, the superblock is probed for the filesystem type
357 .RI ( minix ", " ext ", " ext2 ", " xiafs ", " iso9660 ", " romfs
359 If this probe fails, mount will try to read the file
360 .IR /etc/filesystems ,
361 or, if that does not exist,
362 .IR /proc/filesystems .
363 All of the filesystem types listed there will be tried,
364 except for those that are labeled "nodev" (e.g.,
371 type may be useful for user-mounted floppies.
374 can be useful to change the probe order (e.g., to try vfat before msdos)
375 or if you use a kernel module autoloader.
376 Warning: the probing uses a heuristic (the presence of appropriate `magic'),
377 and could recognize the wrong filesystem type.
379 More than one type may be specified in a comma separated
380 list. The list of file system types can be prefixed with
382 to specify the file system types on which no action should be taken.
383 (This can be meaningful with the
387 For example, the command:
390 .B "mount \-a \-t nomsdos,ext"
392 mounts all file systems except those of type
399 Options are specified with a
401 flag followed by a comma separated string of options.
402 Some of these options are only useful when they appear in the
404 file. The following options apply to any file system that is being
409 All I/O to the file system should be done asynchronously.
412 Update inode access time for each access. This is the default.
415 Can be mounted with the
421 .BR rw ", " suid ", " dev ", " exec ", " auto ", " nouser ", and " async.
424 Interpret character or block special devices on the file system.
427 Permit execution of binaries.
430 Do not update inode access times on this file system (e.g, for faster
431 access on the news spool to speed up news servers).
434 Can only be mounted explicitly (i.e., the
436 option will not cause the file system to be mounted).
439 Do not interpret character or block special devices on the file
443 Do not allow execution of any binaries on the mounted file system.
444 This option might be useful for a server that has file systems containing
445 binaries for architectures other than its own.
448 Do not allow set-user-identifier or set-group-identifier bits to take
449 effect. (This seems safe, but is in fact rather unsafe if you have
450 suidperl(1) installed.)
453 Forbid an ordinary (i.e., non-root) user to mount the file system.
457 Attempt to remount an already-mounted file system. This is commonly
458 used to change the mount flags for a file system, especially to make a
459 readonly file system writeable.
462 Mount the file system read-only.
465 Mount the file system read-write.
468 Allow set-user-identifier or set-group-identifier bits to take
472 All I/O to the file system should be done synchronously.
475 Allow an ordinary user to mount the file system. This option implies
477 .BR noexec ", " nosuid ", and " nodev
478 (unless overridden by subsequent options, as in the option line
479 .BR user,exec,dev,suid ).
482 .SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
483 The following options apply only to certain file systems.
484 We sort them by file system. They all follow the
488 .SH "Mount options for affs"
490 \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
491 Set the owner and group of the root of the file system (default: uid=gid=0,
496 without specified value, the uid and gid of the current process are taken).
498 \fBsetuid=\fP\fIvalue\fP and \fBsetgid=\fP\fIvalue\fP
499 Set the owner and group of all files.
502 Set the mode of all files to
504 disregarding the original permissions.
505 Add search permission to directories that have read permission.
506 The value is given in octal.
509 Do not allow any changes to the protection bits on the file system.
512 Set uid and gid of the root of the file system to the uid and gid
513 of the mount point upon the first sync or umount, and then
514 clear this option. Strange...
517 Print an informational message for each successful mount.
520 Prefix used before volume name, when following a link.
523 Prefix (of length at most 30) used before '/' when following a symbolic link.
526 (Default: 2.) Number of unused blocks at the start of the device.
529 Give explicitly the location of the root block.
532 Give blocksize. Allowed values are 512, 1024, 2048, 4096.
534 .BR grpquota " / " noquota " / " quota " / " usrquota
535 These options are accepted but ignored.
537 .SH "Mount options for coherent"
540 .SH "Mount options for ext"
542 Note that the `ext' file system is obsolete. Don't use it.
543 Since Linux version 2.1.21 extfs is no longer part of the kernel source.
545 .SH "Mount options for ext2"
546 The `ext2' file system is the standard Linux file system.
547 Due to a kernel bug, it may be mounted with random mount options
548 (fixed in Linux 2.0.4).
550 .BR bsddf " / " minixdf
551 Set the behaviour for the
555 behaviour is to return in the
557 field the total number of blocks of the file system, while the
559 behaviour (which is the default) is to subtract the overhead blocks
560 used by the ext2 file system and not available for file storage. Thus
564 % mount /k -o minixdf; df /k; umount /k
565 Filesystem 1024-blocks Used Available Capacity Mounted on
566 /dev/sda6 2630655 86954 2412169 3% /k
567 % mount /k -o bsddf; df /k; umount /k
568 Filesystem 1024-blocks Used Available Capacity Mounted on
569 /dev/sda6 2543714 13 2412169 0% /k
572 (Note that this example shows that one can add command line options
573 to the options given in
577 .BR check " / " check=normal " / " check=strict
578 Set checking level. When at least one of these options is set (and
580 is set by default) the inodes and blocks bitmaps are checked upon mount
581 (which can take half a minute or so on a big disk).
582 With strict checking, block deallocation checks that the block to free
585 .BR check=none " / " nocheck
589 Print debugging info upon each (re)mount.
591 .BR errors=continue " / " errors=remount-ro " / " errors=panic
592 Define the behaviour when an error is encountered.
593 (Either ignore errors and just mark the file system erroneous and continue,
594 or remount the file system read-only, or panic and halt the system.)
595 The default is set in the filesystem superblock, and can be
599 .BR grpid " or " bsdgroups " / " nogrpid " or " sysvgroups
600 These options define what group id a newly created file gets.
603 is set, it takes the group id of the directory in which it is created;
604 otherwise (the default) it takes the fsgid of the current process, unless
605 the directory has the setgid bit set, in which case it takes the gid
606 from the parent directory, and also gets the setgid bit set
607 if it is a directory itself.
609 \fBresgid=\fP\fIn\fP and \fBresuid=\fP\fIn\fP
610 The ext2 file system reserves a certain percentage of the available
611 space (by default 5%, see
615 These options determine who can use the reserved blocks.
616 (Roughly: whoever has the specified uid, or belongs to the specified group.)
619 Instead of block 1, use block
621 as superblock. This could be useful when the filesystem has been damaged.
622 Usually, copies of the superblock are found every 8192 blocks: in
623 block 1, 8193, 16385, ...
624 (Thus, one gets hundreds or even thousands of copies of the superblock
625 on a big filesystem. I do not know of options to mke2fs that would
626 cause fewer copies to be written.)
628 .BR grpquota " / " noquota " / " quota " / " usrquota
629 These options are accepted but ignored.
631 .SH "Mount options for fat"
634 is not a separate filesystem, but a common part of the
641 .BR blocksize=512 " / " blocksize=1024
642 Set blocksize (default 512).
644 \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
645 Set the owner and group of all files. (Default: the uid and gid
646 of the current process.)
649 Set the umask (the bitmask of the permissions that are
651 present). The default is the umask of the current process.
652 The value is given in octal.
655 Three different levels of pickyness can be chosen:
659 Upper and lower case are accepted and equivalent, long name parts are
661 .I verylongname.foobar
664 leading and embedded spaces are accepted in each name part (name and extension).
667 Like "relaxed", but many special characters (*, ?, <, spaces, etc.) are
668 rejected. This is the default.
671 Like "normal", but names may not contain long parts and special characters
672 that are sometimes used on Linux, but are not accepted by MS-DOS are
673 rejected. (+, =, spaces, etc.)
676 .BR conv=b[inary] " / " conv=t[ext] " / " conv=a[uto]
679 file system can perform CRLF<-->NL (MS-DOS text format to UNIX text
680 format) conversion in the kernel. The following conversion modes are
685 no translation is performed. This is the default.
688 CRLF<-->NL translation is performed on all files.
691 CRLF<-->NL translation is performed on all files that don't have a
692 "well-known binary" extension. The list of known extensions can be found at
695 (as of 2.0, the list is: exe, com, bin, app, sys, drv, ovl, ovr, obj,
696 lib, dll, pif, arc, zip, lha, lzh, zoo, tar, z, arj, tz, taz, tzp, tpz,
697 gz, tgz, deb, gif, bmp, tif, gl, jpg, pcx, tfm, vf, gf, pk, pxl, dvi).
699 Programs that do computed lseeks won't like in-kernel text conversion.
700 Several people have had their data ruined by this translation. Beware!
702 For file systems mounted in binary mode, a conversion tool
703 (fromdos/todos) is available.
709 flag. A version string and a list of file system parameters will be
710 printed (these data are also printed if the parameters appear to be
713 .BR fat=12 " / " fat=16
714 Specify either a 12 bit fat or a 16 bit fat. This overrides
715 the automatic FAT type detection routine. Use with caution!
720 flag. Attempts to chown or chmod files do not return errors,
721 although they fail. Use with caution!
723 .B "sys_immutable, showexec, dots, nodots, dotsOK=[yes|no]"
724 Various misguided attempts to force Unix or DOS conventions
725 onto a FAT file system.
727 .SH "Mount options for hpfs"
729 \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
730 Set the owner and group of all files. (Default: the uid and gid
731 of the current process.)
734 Set the umask (the bitmask of the permissions that are
736 present). The default is the umask of the current process.
737 The value is given in octal.
739 .BR case=lower " / " case=asis
740 Convert all files names to lower case, or leave them.
744 .BR conv=binary " / " conv=text " / " conv=auto
747 delete some random CRs (in particular, all followed by NL)
751 choose more or less at random between
752 .BR conv=binary " and " conv=text .
755 just read what is in the file. This is the default.
758 Do not abort mounting when certain consistency checks fail.
760 .SH "Mount options for iso9660"
763 filenames appear in a 8.3 format (i.e., DOS-like restrictions on filename
764 length), and in addition all characters are in upper case. Also there is
765 no field for file ownership, protection, number of links, provision for
766 block/character devices, etc.
768 Rock Ridge is an extension to iso9660 that provides all of these unix like
769 features. Basically there are extensions to each directory record that
770 supply all of the additional information, and when Rock Ridge is in use,
771 the filesystem is indistinguishable from a normal UNIX file system (except
772 that it is read-only, of course).
775 Disable the use of Rock Ridge extensions, even if available. Cf.\&
778 .BR check=r[elaxed] " / " check=s[trict]
781 a filename is first converted to lower case before doing the lookup.
782 This is probably only meaningful together with
789 \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
790 Give all files in the file system the indicated user or group id,
791 possibly overriding the information found in the Rock Ridge extensions.
795 .BR map=n[ormal] " / " map=o[ff]
796 For non-Rock Ridge volumes, normal name translation maps upper
797 to lower case ASCII, drops a trailing `;1', and converts `;' to `.'.
800 no name translation is done. See
806 For non-Rock Ridge volumes, give all files the indicated mode.
807 (Default: read permission for everybody.)
808 Since Linux 2.1.37 one no longer needs to specify the mode in
809 decimal. (Octal is indicated by a leading 0.)
812 Also show hidden and associated files.
814 .B block=[512|1024|2048]
815 Set the block size to the indicated value.
819 .BR conv=a[uto] " / " conv=b[inary] " / " conv=m[text] " / " conv=t[ext]
822 Since Linux 1.3.54 this option has no effect anymore.
823 (And non-binary settings used to be very dangerous,
824 often leading to silent data corruption.)
827 If the high byte of the file length contains other garbage,
828 set this mount option to ignore the high order bits of the file length.
829 This implies that a file cannot be larger than 16MB.
830 The `cruft' option is set automatically if the entire CDROM
831 has a weird size (negative, or more than 800MB). It is also
832 set when volume sequence numbers other than 0 or 1 are seen.
834 .SH "Mount options for minix"
837 .SH "Mount options for msdos"
838 See mount options for fat.
841 file system detects an inconsistency, it reports an error and sets the file
842 system read-only. The file system can be made writeable again by remounting
845 .SH "Mount options for ncp"
848 implementation expects a binary argument (a
849 .IR "struct ncp_mount_data" )
850 to the mount system call. This argument is constructed by
852 and the current version of
854 (2.6h) does not know anything about ncp.
856 .SH "Mount options for nfs"
857 Instead of a textual option string, parsed by the kernel, the
859 file system expects a binary argument of type
860 .IR "struct nfs_mount_data" .
863 itself parses the following options of the form `tag=value',
864 and puts them in the structure mentioned:
885 is accepted but ignored.
886 Also the following Boolean options, possibly preceded by
903 Especially useful options include
905 .B rsize=8192,wsize=8192
906 This will make your nfs connection much faster than with the default
910 The program accessing a file on a NFS mounted file system will hang
911 when the server crashes. The process cannot be interrupted or
912 killed unless you also specify
914 When the NFS server is back online the program will continue undisturbed
915 from where it was. This is probably what you want.
918 This option allows the kernel to time out if the nfs server is not
919 responding for some time. The time can be
922 This option might be useful if your nfs server sometimes doesn't respond
923 or will be rebooted while some process tries to get a file from the server.
924 Usually it just causes lots of trouble.
927 Do not use locking. Do not start lockd.
929 .SH "Mount options for proc"
931 \fBuid=\fP\fIvalue\fP and \fBgid=\fP\fIvalue\fP
932 These options are recognized, but have no effect as far as I can see.
934 .SH "Mount options for romfs"
937 .SH "Mount options for smbfs"
940 implementation expects a binary argument (a
941 .IR "struct smb_mount_data" )
942 to the mount system call. This argument is constructed by
944 and the current version of
946 (2.6c) does not know anything about smb.
948 .SH "Mount options for sysv"
951 .SH "Mount options for ufs"
954 .SH "Mount options for umsdos"
955 See mount options for msdos.
958 option is explicitly killed by
961 .SH "Mount options for vfat"
962 First of all, the mount options for
967 option is explicitly killed by
969 Furthermore, there are
972 Translate unhandled Unicode characters to special escaped sequences.
973 This lets you backup and restore filenames that are created with any
974 Unicode characters. Without this option, a '?' is used when no
975 translation is possible. The escape character is ':' because it is
976 otherwise illegal on the vfat filesystem. The escape sequence
977 that gets used, where u is the unicode character,
978 is: ':', (u & 0x3f), ((u>>6) & 0x3f), (u>>12).
981 Allow two files with names that only differ in case.
984 First try to make a short name without sequence number,
988 .SH "Mount options for xenix"
991 .SH "Mount options for xiafs"
992 None. Although nothing is wrong with xiafs, it is not used much,
993 and is not maintained. Probably one shouldn't use it.
994 Since Linux version 2.1.21 xiafs is no longer part of the kernel source.
996 .SH "THE LOOP DEVICE"
997 One further possible type is a mount via the loop device. For example,
1001 .B " mount /tmp/fdimage /mnt -t msdos -o loop=/dev/loop3,blocksize=1024"
1004 will set up the loop device
1006 to correspond to the file
1008 and then mount this device on
1010 This type of mount knows about three options, namely
1011 .BR loop ", " offset " and " encryption ,
1012 that are really options to
1014 If no explicit loop device is mentioned
1015 (but just an option `\fB\-o loop\fP' is given), then
1017 will try to find some unused loop device and use that.
1018 If you are not so unwise as to make
1022 then any loop device allocated by
1026 You can also free a loop device by hand, using `losetup -d', see
1034 table of mounted file systems
1054 It is possible for a corrupted file system to cause a crash.
1056 Some Linux file systems don't support
1060 support synchronous updates (a la BSD) when mounted with the
1066 may not be able to change mount parameters (all
1067 .IR ext2fs -specific
1070 are changeable with a remount, for example, but you can't change
1079 command existed in Version 5 AT&T UNIX.