Mount ( English mount , German assemble, attach ) or hooking , integrate or activate designated for Unix and some other operating systems the process, a file system at a certain point - the mount ( English mount point ) - to be made available to allow the user to can access the files .
The opposite of mounting is unmounting ( new German , English unmount ), dismounting ( English dismount ) or unmounting . This requires that no more processes access files on the file system and that all data is written to the file system. The operating system therefore tries to terminate all those processes in an orderly manner that still have open or unfinished accesses - if this cannot be achieved, the unmounting fails. If a program or process cannot release these resources because they are necessary for execution, a file system cannot therefore be unmounted: a prominent example of this is the system drive ( English boot volume ) of an operating system.
If a file system is removed without unmounting (e.g. a USB stick removed), data may be lost or the data integrity on the file system may be destroyed if not all data has yet been written to the file system.
The Unix command
Under Unix-like operating systems, mounting is initiated by calling up the command
mount which, in the absence of command line parameters, outputs the list of activated file systems. Because of its proximity to the operating system, the syntax of the command is heavily dependent on the operating system and therefore differs from system to system, but it usually has the form
mount [optionen] device dir
device stands for a device file , for example
dirthe last parameter specifies the mount point , i.e. H. an existing directory. Usually only the root account is allowed to perform mounts. However, if there are related entries in the fstab file, "normal" users can also mount corresponding devices, depending on the operating system. This is also possible with
pmounta wrapper around
The analog command for unmounting a file system is umount and is usually with the syntax
called, where stands
dir_or_devfor the device or the mount point.
The integration is often done automatically without user intervention, especially when booting . Removable media such as CD , floppy disks or USB sticks , on the other hand, may be made available through access by an automounter.
With Windows , automounting is usually done automatically with the help of another drive letter such as
E:, while with macOS (formerly "Mac OS X" and "OS X") removable media are integrated by the automounter
/Volumesand then appear on the desktop . A subdirectory of or is often used on Linux .
$ mount /dev/sda2 /mein/verzeichnis
The directory must
/mein/verzeichnisalready exist for this, the name is arbitrary. After hanging then the files and directories that are on that partition, under pathname as
/mein/verzeichnis/entwürfe/blabla.txtusable. The files that were previously shown in
/mein/verzeichnis(if it was not empty) are normally no longer accessible until they are unmounted.
Subsequent hanging is achieved by:
$ umount /dev/sda2
$ umount /mein/verzeichnis
$ mount -r -t iso9660 -o loop /pfad/zum/CD_oder_DVD-Abbild.iso /mein/verzeichnis
mount(2): Mount filesystem - Debian GNU / Linux system calls man page
mount(8): mount a filesystem - Debian GNU / Linux system administration manual page
mount(8): mount file systems - OpenBSD System Manager's Manual
- mount in the German wiki of UbuntuUsers.de
- mounting under Linux. What does mounting mean? Retrieved September 29, 2015 .
- Thorsten Leemhuis: Please mount - automatically mount partitions and network shares. In: Heise online . November 16, 2013 . Retrieved September 29, 2015.
- Article in linuxwiki.de