1 .\" Copyright (c) 1980, 1989, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)mount.8 8.8 (Berkeley) 6/16/94
33 .\" $FreeBSD: src/sbin/mount/mount.8,v 1.31.2.12 2003/02/23 21:17:42 trhodes Exp $
40 .Nd mount file systems
49 .Brq Ar special | node
60 system call to prepare and graft a
62 or the remote node (rhost:path) on to the file system tree at the point
68 are not provided, the appropriate information is taken from the
72 The system maintains a list of currently mounted file systems.
73 If no arguments are given to
77 The options are as follows:
78 .Bl -tag -width indent
80 All the filesystems described in
83 Exceptions are those marked as
87 flag (see below), or if they are already mounted (except the
88 root filesystem which is always remounted to preserve
89 traditional single user mode behavior).
91 Causes everything to be done except for the actual system call.
92 This option is useful in conjunction with the
97 command is trying to do.
103 Forces the revocation of write access when trying to downgrade
104 a filesystem mount status from read-write to read-only.
106 forces the R/W mount of an unclean filesystem (dangerous; use with
109 Options are specified with a
111 flag followed by a comma separated string of options.
114 prefix is added or removed from a option name, then meaning is negated.
115 In case of conflicting options being specified, the rightmost option
117 The following options are available:
118 .Bl -tag -width indent
122 to the file system should be done asynchronously.
126 and should not be used unless you are prepared to recreate the file
127 system should your system crash.
131 flag, this is the same as specifying the options currently in effect for
132 the mounted filesystem.
136 forces the revocation of write access when trying to downgrade
137 a filesystem mount status from read-write to read-only.
139 forces the R/W mount of an unclean filesystem (dangerous; use with caution).
143 flag, this is the same as specifying all the options listed in the
145 file for the filesystem.
147 Metadata I/O should be done synchronously, while data I/O should be done
151 Do not update the file access time when reading from a file.
153 is useful on filesystems where there are large numbers of files and
154 performance is more critical than updating the file access time (which is
155 rarely ever important).
156 This option is currently only supported on local filesystems.
158 This filesystem should be skipped when
164 Disable read clustering.
166 Disable write clustering.
168 Do not interpret character or block special devices on the file system.
169 This option is useful for a server that has file systems containing
170 special devices for architectures other than its own.
171 This option is set automatically when the user does not have super-user
174 Do not allow execution of any binaries on the mounted file system.
175 This option is useful for a server that has file systems containing
176 binaries for architectures other than its own.
178 Do not allow set-user-identifier or set-group-identifier bits to take effect.
179 Note: this option is worthless if a public available suid or sgid
182 is installed on your system.
183 It is set automatically when the user does not have super-user privileges.
185 Do not follow symlinks
186 on the mounted file system.
187 .It Cm rdonly , ro , norw
190 mount the file system read-only (even the super-user may not write it).
194 to the file system should be done synchronously.
196 If the device supports TRIM
197 .Va ( kern.cam.da.X.trim_enabled
199 the file system will perform online trim for corresponding block deletions.
202 supports this feature.
204 A directory on the mounted filesystem will respond to the SUID bit
205 being set, by setting the owner of any new files to be the same
206 as the owner of the directory.
207 New directories will inherit the bit from their parents.
208 Execute bits are removed from
209 the file, and it will not be given to root.
211 This feature is designed for use on fileservers serving PC users via
212 ftp, SAMBA, or netatalk.
213 It provides security holes for shell users and as
214 such should not be used on shell machines, especially on home directories.
215 This option requires the SUIDDIR
216 option in the kernel to work.
219 filesystems support this option.
222 for more information.
226 indicate that the status of an already mounted file system should be changed.
228 Causes the namespace at the mount point to appear as the union
229 of the mounted filesystem root and the existing directory.
230 Lookups will be done in the mounted filesystem first.
231 If those operations fail due to a non-existent file the underlying
232 directory is then accessed.
233 All creates are done in the mounted filesystem.
239 Any additional options specific to a filesystem type that is not
240 one of the internally known types (see the
242 option) may be passed as a comma separated list; these options are
243 distinguished by a leading
246 Options that take a value are specified using the syntax -option=value.
250 .Bd -literal -offset indent
251 mount -t mfs -o nosuid,-N,-s=4000 /dev/da0s0b /tmp
256 to execute the equivalent of:
257 .Bd -literal -offset indent
258 /sbin/mount_mfs -o nosuid -N -s 4000 /dev/da0s0b /tmp
261 Additional options specific to filesystem types
262 which are not internally known
263 (see the description of the
266 may be described in the manual pages for the associated
267 .Pa /sbin/mount_ Ns Sy XXX
270 Print mount information in
273 If fstab is missing or if the freq and passno fields are omitted,
274 the default values as described in
281 The file system is to be mounted read-only.
282 Mount the file system read-only (even the super-user may not write it).
289 The argument following the
291 is used to indicate the file system type.
298 to indicate that the actions should only be taken on
299 filesystems of the specified type.
300 More than one type may be specified in a comma separated list.
301 The list of filesystem types can be prefixed with
303 to specify the filesystem types for which action should
309 .Bd -literal -offset indent
310 mount -a -t nonfs,mfs
313 mounts all filesystems except those of type
318 If the type is not the internally known type,
321 will attempt to execute a program in
322 .Pa /sbin/mount_ Ns Sy XXX
325 is replaced by the type name.
326 For example, nfs filesystems are mounted by the program
327 .Pa /sbin/mount_nfs .
329 Most filesystems will be dynamically loaded by their
332 if not already present in the kernel, using the
335 Because this mechanism requires writable temporary space,
336 the filesystem type containing
338 must be compiled into the kernel, and the filesystems containing
344 before any filesystems which might be dynamically loaded.
348 flag indicates that the status of an already mounted file
349 system should be changed.
350 Any of the options discussed above (the
354 also a file system can be changed from read-only to read-write
356 An attempt to change from read-write to read-only will fail if any
357 files on the filesystem are currently open for writing unless the
359 flag is also specified.
360 The set of options is determined by applying the options specified
363 and finally applying the
371 The file system object is to be read and write.
374 .Bl -tag -width PATH_FSTAB
376 If the environment variable
378 is set all operations are performed against the specified file.
381 .Bl -tag -width /etc/fstab -compact
386 Various, most of them are self-explanatory.
388 .Dl XXXXX filesystem is not available
390 The kernel does not support the respective filesystem type.
392 support for a particular filesystem might be provided either on a static
393 (kernel compile-time), or dynamic basis (loaded as a kernel module by
397 or its subprocesses attempt to dynamically load a filesystem module if
398 it has not been configured statically, using
400 In this case, the above error message can also mean that you did not
401 have permission to load the module.
417 .Xr mount_linprocfs 8 ,
436 the permissions on the original mount point determine if
438 is accessible from the mounted file system.
439 The minimum permissions for
440 the mount point for traversal across the mount point in both
441 directions to be possible for all users is 0111 (execute for all).
448 It is possible for a corrupted file system to cause a crash.