|MOUNT(8)||System Manager's Manual||MOUNT(8)|
] special | node
] special node
mountcommand invokes a file system specific program to prepare and graft the special device or remote node (rhost:path) on to the file system tree at the point node. If either special or node are not provided, the appropriate information is taken from the fstab(5) file. For disk partitions, the special device is either a disklabel(8) UID (DUID) or an entry in /dev. If it is a DUID, it will be automatically mapped to the appropriate entry in /dev. In either case the partition must be present in the disklabel loaded from the device. The partition name is the last letter in the entry name. For example, /dev/sd0a and 3eb7f9da875cb9ee.a both refer to the ‘a’ partition. A mount point node must be an existing directory for a mount to succeed (except in the special case of /, of course). Only the superuser may mount file systems. The system maintains a list of currently mounted file systems. If no arguments are given to
mount, this list is printed. The options are as follows:
mountto try to mount all of the file systems listed in the fstab(5) table except those for which the “noauto” or “net” options are specified.
-Aflag, except that if a file system (other than the root file system) appears to be already mounted,
mountwill not try to mount it again.
mountassumes that a file system is already mounted if a file system with the same type is mounted on the given mount point. More stringent checks are not possible because some file system types report strange values for the mounted-from device for mounted file systems.
-vflag to determine what the
mountcommand is trying to do.
mountwill only look at file systems which have the “net” option specified. By default file systems with the “net” option are ignored.
softdepare mutually exclusive.
-f; forces the revocation of write access when trying to downgrade a file system mount status from read-write to read-only.
-r; mount the file system read-only (even the superuser may not write it).
-uflag and a file system is already mounted read/write. The options
softdepare mutually exclusive.
-u; indicate that the status of an already mounted file system should be changed.
-toption) may be passed as a comma separated list; these options are distinguished by a leading “-” (dash). Options that take a value are specified using the syntax -option=value. For example:
# mount -t mfs -o rw,nodev,nosuid,-s=153600 /dev/sd0b /tmp
mountto execute the equivalent of:
# /sbin/mount_mfs -o rw,nodev,nosuid -s 153600 /dev/sd0b /tmp
swap /tmp mfs rw,nodev,nosuid,-s=153600 0 0
-aflag for a description of the criteria used to decide if a file system is already mounted.
-tis used to indicate the file system type. The type ffs is the default. The
-toption can be used to indicate that the actions should only be taken on file systems of the specified type. More than one type may be specified in a comma separated list. The list of file system types can be prefixed with “no” to specify the file system types for which action should not be taken. For example, the
# mount -a -t nonfs,mfs
mountwill attempt to execute a program in /sbin/mount_XXX where XXX is replaced by the type name. For example, NFS file systems are mounted by the program /sbin/mount_nfs.
-uflag indicates that the status of an already mounted file system should be changed. Any of the options discussed above (the
-ooption) may be changed; also a file system can be changed from read-only to read-write or vice versa. An attempt to change from read-write to read-only will fail if any files on the file system are currently open for writing unless the
-fflag is also specified. Only options specified on the command line with
-oare changed; other file system options are unaltered. The options set in the fstab(5) table are ignored.
mount_XXXcommands. For instance, the options specific to Berkeley Fast File Systems are described in the mount_ffs(8) manual page.
# mount -t cd9660 -r /dev/cd0a /mnt/cdrom
# mount -t msdos 3eb7f9da875cb9ee.i /mnt/key
# mount host:/path/name /mnt/nfs
# mount -u -o dev /var
mountcommand appeared in Version 1 AT&T UNIX.
mount, the permissions on the original mount point determine if “..” is accessible from the mounted file system. The minimum permissions for the mount point for traversal across the mount point in both directions to be possible for all users is 0111 (execute for all).
|January 18, 2018||OpenBSD-current|