World Library  
Flag as Inappropriate
Email this Article

Mount (Unix)

Article Id: WHEBN0002622744
Reproduction Date:

Title: Mount (Unix)  
Author: World Heritage Encyclopedia
Language: English
Subject: Mkfs, FAT filesystem and Linux, Fuser (Unix), Initrd, Mount
Collection: Unix File System-Related Software
Publisher: World Heritage Encyclopedia
Publication
Date:
 

Mount (Unix)

Before a user can access a file on a Unix-like machine, the file system that contains it needs to be mounted with the mount command. Frequently mount is used for SD card, USB storage, DVD and other removable storage devices.

The mount command instructs the operating system that a file system is ready to use, and associates it with a particular point in the overall file system hierarchy (its mount point) and sets options relating to its access. Mounting makes file systems, files, directories, devices and special files available for use and available to the user. Its counterpart umount instructs the operating system that the file system should be disassociated from its mount point, making it no longer accessible and may be removed from the computer. It is important to umount a device before removing it since changes to files may have only partially been written and are completed as part of the umount.

The mount and umount commands require root user privilege to effect changes. Alternately, specific privileges to perform the corresponding action may have been previously granted by the root user. A file system can be defined as user mountable in the /etc/fstab file by the root user.

Contents

  • Use 1
  • Derivatives and wrappers 2
  • See also 3
  • References 4
  • External links 5

Use

Display all mounted partitions:

$ mount
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
/tmp on /var/tmp type none (rw,noexec,nosuid,bind)
10.4.0.4:/srv/export/setup_server on /nfs/setup_server type nfs (ro,addr=10.4.0.4)

This example will mount the second partition of a HDD (hard disk drive):

$ mount /dev/hda2 /media/PHOTOS

and will unmount (by referring to the physical disk partition) :

$ umount /dev/hda2

or (by referring to the mount point)

$ umount /media/PHOTOS

To remount a partition with specific options:

$ mount -o remount,rw /dev/hda2

Derivatives and wrappers

pmount is a wrapper around the standard mount program which permits normal users to mount removable devices without a matching /etc/fstab entry. This provides a robust basis for automounting frameworks like GNOME's Utopia project and keeps the usage of root to a minimum.

This package also contains a wrapper pmount-hal, which reads information such as device labels and mount options from HAL and passes it to pmount.

The gnome-mount package contains programs for mounting, unmounting and ejecting storage devices. The goal for gnome-mount is for GNOME software such as gnome-volume-manager and GNOME-VFS to use this instead of invoking mount/umount/eject/pmount or direct HAL invoking methods. GNOME previously used pmount. Note, gnome-mount is not intended for direct use by users.

All the gnome-mount programs utilize HAL methods and as such run unprivileged. The rationale for gnome-mount is to have a centralized place (in GConf) where settings such as mount options and mount locations are maintained.[1]

As with all unix-like commands, the options are specific to the version of mount and are precisely detailed in its man page.

In addition to the system call mount, the function mount_root() mounts the first, or root filesystem. In this context mount is called by the system call setup.

See also

References

  1. ^ gnome-mount-0.6

External links

This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.