umount(2) System Calls Manual umount(2)
NAME
umount(), umount2() - unmount a file system
SYNOPSIS
DESCRIPTION
requests that a previously mounted file system contained on the block special device identified by name be unmounted.
requests that a previously mounted file system contained on the block special device identified by name be unmounted in the manner
described in flags.
name is a pointer to a path name.
flags is a bitmask of flags, specified in that are combined to describe the type of unmount to be performed. Valid flags are:
perform a normal unmount
perform a forced unmount
MS_NORMAL and MS_FORCE are mutually exclusive.
A forced unmount is one which will occur regardless of activity on the file system.
After unmounting the file system, the directory upon which the file system was mounted reverts to its ordinary interpretation.
and can also request that a file system mounted previously on the directory identified by name be unmounted. After unmounting the file
system, name reverts to its ordinary interpretation.
and can be invoked only by the user with the appropriate privilege.
NETWORKING FEATURES
NFS
path must indicate a directory name when unmounting an NFS file system.
RETURN VALUE
If successful, and return a value of Otherwise, they return a value of -1 and set to indicate the error.
ERRORS
and fail if one or more of the following are true:
A component of the path prefix of
name denies search permission.
A file on name is busy.
name points outside the allocated address space of the process. Reliable detection of this error is implementation dependent.
name is not mounted.
flags is not a valid combination of flags.
Too many symbolic links were encountered in translating the path
name.
name exceeds bytes, or a component of name exceeds bytes while is in effect.
name does not exist.
name is null.
A forced unmount was requested on a file system that does not
support it.
name is not a block special device.
A component of name is not a directory.
The device associated with
name does not exist.
The effective user ID of the process
is not that of a user with appropriate privileges.
SEE ALSO
mount(1M), mount(2), privileges(5).
STANDARDS CONFORMANCE
umount(2)