]> git.cameronkatri.com Git - apple_cmds.git/blob - diskdev_cmds/mount.tproj/mount.8
setup.sh: Use iOS ~12 XNU version
[apple_cmds.git] / diskdev_cmds / mount.tproj / mount.8
1 .\" Copyright (c) 1980, 1989, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
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.
19 .\"
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
30 .\" SUCH DAMAGE.
31 .\"
32 .\" @(#)mount.8 8.8 (Berkeley) 6/16/94
33 .\"
34 .Dd June 16, 1994
35 .Dt MOUNT 8
36 .Os BSD 4
37 .Sh NAME
38 .Nm mount
39 .Nd mount file systems
40 .Sh SYNOPSIS
41 .Nm mount
42 .Op Fl adfruvw
43 .Op Fl t Ar lfs | external_type
44 .Nm mount
45 .Op Fl dfruvw
46 .Ar special | mount_point
47 .Nm mount
48 .Op Fl dfruvw
49 .Op Fl o Ar options
50 .Op Fl t Ar lfs | external_type
51 .Ar special mount_point
52 .Sh DESCRIPTION
53 The
54 .Nm mount
55 command
56 calls the
57 .Xr mount 2
58 system call to prepare and graft a
59 .Ar "special device"
60 or the remote node (rhost:path) on to the file system tree at the point
61 .Ar mount_point ,
62 which must be a directory. If either
63 .Ar special
64 or
65 .Ar mount_point
66 are not provided, the appropriate information is obtained via the
67 .Xr getfsent 3
68 library routines.
69 .Pp
70 The system maintains a list of currently mounted file systems.
71 If no arguments are given to
72 .Nm mount,
73 this list is printed.
74 .Pp
75 The options are as follows:
76 .Bl -tag -width indent
77 .It Fl a
78 All the filesystems listed via
79 .Xr getfsent 3
80 are mounted.
81 Exceptions are those marked as ``noauto;'' excluded by the
82 .Fl t
83 flag (see below); entries that are neither ``ro,'' ``rw,'' or
84 ``rq;'' ``nfs'' entries that also have ``net'' as an option; and
85 already-mounted ``nfs'' entries.
86 .It Fl d
87 Causes everything to be done except for the actual system call.
88 This option is useful in conjunction with the
89 .Fl v
90 flag to
91 determine what the
92 .Nm mount
93 command is trying to do.
94 .It Fl f
95 Forces the revocation of write access when trying to downgrade
96 a filesystem mount status from read-write to read-only.
97 .It Fl o
98 Options are specified with a
99 .Fl o
100 flag followed by a comma separated string of options.
101 The following options are available:
102 .Bl -tag -width indent
103 .It async
104 All
105 .Tn I/O
106 to the file system should be done asynchronously.
107 This can be somewhat dangerous with respect to losing data when faced with
108 system crashes and power outages.
109 This is also the default.
110 It can be avoided with the
111 .Em noasync
112 option.
113 .It force
114 The same as
115 .Fl f ;
116 forces the revocation of write access when trying to downgrade
117 a filesystem mount status from read-write to read-only.
118 .It noasync
119 This filesystem should not force all
120 .Tn I/O
121 to be written asynchronously.
122 .It noauto
123 This filesystem should be skipped when mount is run with the
124 .Fl a
125 flag.
126 .It nodev
127 Do not interpret character or block special devices on the file system.
128 This option is useful for a server that has file systems containing
129 special devices for architectures other than its own.
130 .It noexec
131 Do not allow execution of any binaries on the mounted file system.
132 This option is useful for a server that has file systems containing
133 binaries for architectures other than its own.
134 .It noowners
135 Ignore the ownership field for the entire volume.
136 This causes all objects to appear as owned by user ID 99 and group ID 99.
137 User ID 99 is interpreted as the current effective user ID, while group ID 99
138 is used directly and translates to ``unknown''.
139 .It nosuid
140 Do not allow set-user-identifier or set-group-identifier bits to take effect.
141 .It rdonly
142 The same as
143 .Fl r ;
144 mount the file system read-only (even the super-user may not write it).
145 .It sync
146 All
147 .Tn I/O
148 to the file system should be done synchronously.
149 .It update
150 The same as
151 .Fl u ;
152 indicate that the status of an already mounted file system should be changed.
153 .It union
154 Causes the namespace to appear as the union of directories
155 of the mounted filesystem with corresponding directories in the
156 underlying filesystem.
157 Lookups will be done in the mounted filesystem first.
158 If those operations fail due to a non-existent file the underlying
159 directory is then accessed.
160 .It noatime
161 Do not update the file access time when reading from a file.
162 This option is useful on file systems where there are large numbers of files
163 and performance is more critical than updating the file access time (which
164 is rarely ever important).
165 .It strictatime
166 Always update the file access time when reading from a file. Without this option the
167 filesystem may default to a less strict update mode, where some access time updates
168 are skipped for performance reasons. This option could be ignored if it is not supported
169 by the filesystem.
170 .It nobrowse
171 This option indicates that the mount point should not be visible
172 via the GUI (i.e., appear on the Desktop as a separate volume).
173 .El
174 .Pp
175 Any additional options specific to a filesystem type that is not
176 one of the internally known types (see the
177 .Fl t
178 option) may be passed as a comma separated list; these options are
179 distinguished by a leading
180 .Dq \&-
181 (dash).
182 Options that take a value are specified using the syntax -option=value.
183 For example, the mount command:
184 .Bd -literal -offset indent
185 mount -t hfs -o nosuid,-w,-m=755 /dev/disk2s9 /tmp
186 .Ed
187 .Pp
188 causes
189 .Nm mount
190 to execute the equivalent of:
191 .Bd -literal -offset indent
192 /sbin/mount_hfs -o nosuid -w -m 755 /dev/disk2s9 /tmp
193 .Ed
194 .It Fl r
195 Mount the file system read-only (even the super-user may not write it).
196 The same as the
197 .Dq rdonly
198 argument to the
199 .Fl o
200 option.
201 .It Fl t Ar "lfs \\*(Ba external type"
202 The argument following the
203 .Fl t
204 is used to indicate the file system type.
205 There is no default local file system for use with mount. A type must
206 be specified in order to mount a non-NFS filesystem.
207 The \fI-t\fP option can be used
208 to indicate that the actions should only be taken on
209 filesystems of the specified type.
210 More than one type may be specified in a comma separated list.
211 The list of filesystem types can be prefixed with
212 .Dq no
213 to specify the filesystem types for which action should
214 .Em not
215 be taken.
216 For example, the
217 .Nm mount
218 command:
219 .Bd -literal -offset indent
220 mount -a -t nonfs,hfs
221 .Ed
222 .Pp
223 mounts all filesystems except those of type
224 .Tn NFS
225 and
226 .Tn HFS .
227 .Pp
228 If the type is not one of the internally known types,
229 mount will attempt to execute a program in
230 .Pa /sbin/mount_ Ns Em XXX
231 where
232 .Em XXX
233 is replaced by the type name.
234 For example, nfs filesystems are mounted by the program
235 .Pa /sbin/mount_nfs .
236 .It Fl u
237 The
238 .Fl u
239 flag indicates that the status of an already mounted file
240 system should be changed.
241 Any of the options discussed above (the
242 .Fl o
243 option)
244 may be changed;
245 also a file system can be changed from read-only to read-write
246 or vice versa.
247 An attempt to change from read-write to read-only will fail if any
248 files on the filesystem are currently open for writing unless the
249 .Fl f
250 flag is also specified.
251 The set of options is determined by first extracting the options
252 for the file system from the
253 filesystem table (see
254 .Xr getfsent 3 )
255 then applying any options specified by the
256 .Fl o
257 argument,
258 and finally applying the
259 .Fl r
260 or
261 .Fl w
262 option.
263 .It Fl v
264 Verbose mode.
265 .It Fl w
266 Mount the file system read-write.
267 .Pp
268 The options specific to NFS filesystems are described in the
269 .Xr mount_nfs 8
270 manual page.
271 .El
272 .Sh SEE ALSO
273 .Xr mount 2 ,
274 .Xr getfsent 3 ,
275 .Xr mount_afp 8 ,
276 .Xr mount_cd9660 8 ,
277 .Xr mount_cddafs 8 ,
278 .Xr mount_fdesc 8 ,
279 .Xr mount_hfs 8 ,
280 .Xr mount_apfs 8 ,
281 .Xr mount_msdos 8 ,
282 .Xr mount_nfs 8 ,
283 .Xr mount_smbfs 8 ,
284 .Xr mount_udf 8 ,
285 .Xr mount_webdav 8 ,
286 .Xr umount 8
287 .Sh BUGS
288 It is possible for a corrupted file system to cause a crash.
289 .Sh HISTORY
290 A
291 .Nm mount
292 command appeared in
293 .At v6 .