Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mount(2) [minix man page]

MOUNT(2)							System Calls Manual							  MOUNT(2)

mount, umount - mount or umount a file system SYNOPSIS
#include <unistd.h> #include <sys/mount.h> int mount(char *special, char *name, int flag) int umount(char *name) DESCRIPTION
Mount() tells the system that the file system special is to be mounted on the file name, effectively overlaying name with the file tree on special. Name may of any type, except that if the root of special is a directory, then name must also be a directory. Special must be a block special file, except for loopback mounts. For loopback mounts a normal file or directory is used for special, which must be seen as the root of a virtual device. Flag is 0 for a read-write mount, 1 for read-only. Umount() removes the connection between a device and a mount point, name may refer to either of them. If more than one device is mounted on the same mount point then unmounting at the mount point removes the last mounted device, unmounting a device removes precisely that device. The unmount will only succeed if none of the files on the device are in use. Both calls may only be executed by the super-user. SEE ALSO
mount(1), umount(1). AUTHOR
Kees J. Bot ( MOUNT(2)

Check Out this Related Man Page

mount(8)						      System Manager's Manual							  mount(8)

       mount, umount - mount or unmount file systems

       /etc/mount [ options ] [ device ] [ directory ]

       /etc/umount [ options ] [ device ] [ directory ]

       This  is  a  general description of the command.  Additional descriptions are provided to define the syntax and options for the NFS and UFS
       file systems.

       Each invocation of the command announces to the system that a file system is present on the device device.  The file system may be local or
       remote.	File directory must exist as a directory file.	It becomes the name of the newly mounted file system root.

       If invoked without arguments, prints the list of mounted file systems.

       Physically write-protected disks and magnetic tape file systems must be mounted read-only or an error will occur at mount time.

       General users can only mount file systems with certain restrictions.  For example, the user, other than the superuser, performing the mount
       must own the directory directory.  Furthermore, no users other than the superuser can execute or programs on the mounted file systems.	In
       addition, users other than the superuser cannot access block or special character devices such as on the mounted file systems.

       The  command  announces	to the system that the removable file system previously mounted on the specified directory is to be removed.  Only
       the person who mounted a particular file system or the superuser can unmount the file system again.

       -a	   Reads the file and mounts, or unmounts, all file systems listed there.

       -f	   Fast unmount.  The option has no meaning for local file systems and directories.  However, for remote file system  types  (such
		   as  NFS),  the  option  causes  the	client	to unmount the remotely mounted file systems and directories without notifying the
		   server.  This can avoid the delay of waiting for acknowledgment from a server that is down.

       -o options  Specifies a string that is passed to the kernel and used by the specific file system's mount routine in the kernel.	 For  spe-
		   cific options, refer to the file system-specific description, such as

       -r	   Indicates  that  the  file system is to be mounted read only. To share a disk, each host must mount the file system with the -r

       -t type	   Specifies the type of file system is being mounted.	When used with the option, the option mounts all file systems of the given
		   type found in the file.  For specific file system types, refer to the file system-specific description, such as

       -v	   Tells what did or did not happen.  (Verbose flag)

       The options for are:

       -a	   Unmounts all mounted file systems.  It may be necessary to execute twice to accomplish unmounting of all mounted file systems.

       -v	   Tells what did or did not happen.  (Verbose flag)

       Mounting corrupted file systems will crash the system.

       File systems information table

See Also
       getmnt(2), mount(2), fstab(5), fsck(8), mount(8nfs), mount(8ufs)

Man Page

Featured Tech Videos