mount a file system
All files accessible in a Unix system are arranged in one big tree, the file hierarchy, rooted at /. These files can be spread out over several devices. The mount command serves to attach the file system found on some device to the big file tree.
mount -a [-fFnrsvw] [-t vfstype]
mount [-fnrsvw] [-o options [,...]] device | dir
mount [-fnrsvw] [-t vfstype] [-o options] device dir
mount [-hV] OPTIONS
-a Mount all filesystems (of the given types) men
tioned in fstab.
-F (Used in conjunction with -a.) Fork off a new
incarnation of mount for each device. This will do
the mounts on different devices or different NFS
servers in parallel. This has the advantage that
it is faster; also NFS timeouts go in parallel. A
disadvantage is that the mounts are done in unde
fined order. Thus, you cannot use this option if
you want to mount both /usr and /usr/spool.
-f Causes everything to be done except for the actual
system call; if it''s not obvious, this ``fakes''''
mounting the file system. This option is useful in
conjunction with the -v flag to determine what the
mount command is trying to do. It can also be used
to add entries for devices that were mounted ear
lier with the -n option.
-n Mount without writing in /etc/mtab. This is neces
sary for example when /etc is on a read-only file
-s Tolerate sloppy mount options rather than failing.
This option exists for support of the Linux
-r Mount the file system read-only. A synonym is -o ro
-w Mount the file system read/write. This is the
default. A synonym is -o rw.
Mount the partition that has the specified label.
Mount the partition that has the specified uuid.
-o Several -o options can be specified in a comma separated
string ... see info for more
async All I/O to the file system should be done
atime Update inode access time for each access.
This is the default.
Do not update inode access times on this
file system (e.g, for faster access on the
news spool to speed up news servers).
auto Can be mounted with the -a option.
noauto Can only be mounted explicitly (i.e., the -a
option will not cause the file system to be
ro Mount the file system read-only.
rw Mount the file system read-write.
suid Allow set-user-identifier or set-group-iden
tifier bits to take effect.
sync All I/O to the file system should be done
The argument following the -t is used to indicate
the file system type.
-h Print a help message.
-V Output version.
-v Verbose mode.
File system specific MOUNT options
see info mount for theseThe standard form of the mount command, is mount -t type device dir This tells the kernel to attach the file system found on device (which is of type type) at the directory dir. The previous contents (if any) and owner and mode of dir become invisible, and as long as this file system remains mounted, the pathname dir refers to the root of the file system on device.
Three forms of invocation do not actually mount anything:
print a help message:
print a version string:
list all mounted file systems of type ''type''
mount [-t type]
The proc file system is not associated with a special device, and when mounting it, an arbitrary keyword, such as proc can be used instead of a device specification. (The customary choice none is less fortunate: the error message `none busy'' from umount can be confusing.)
Most devices are indicated by a file name (of a block special device), like /dev/sda1, but there are other possibilities. For example, in the case of an NFS mount, device may look like knuth.cwi.nl:/dir. It is possible to indicate a block special device using its volume label or UUID (see the -L and -U options below).
The file /etc/fstab (see fstab), may contain lines describing what devices are usually mounted where, using which options.
About the Author
FortyPoundHead has posted a total of 1974 articles.
Comments On This Post
No comments on this post yet!
Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.
Or you can drop a note to the administrators if you're not sure where you should post.