CINXE.COM
Mount point definition by The Linux Information Project
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns= "http://www.w3.org/1999/xhtml"> <head> <link rel="stylesheet" type="text/css" href="belug1.css" /> <title>Mount point definition by The Linux Information Project</title></head> <body bgcolor="#ffffff"> <a href="index.html">LINFO</a> <br /><center><h1>Mount Point Definition</h1></center><br /> <table width="100%"><tbody><tr><td width="10%"></td><td width="80%"> <br /> <p> A <i>mount point</i> is a directory (typically an empty one) in the currently accessible <a href="filesystem.html"><i>filesystem</i></a> on which an additional filesystem is <i>mounted</i> (i.e., logically attached). </p> <p> A filesystem is a hierarchy of directories (also referred to as a <a href="directory_tree.html">directory tree</a>) that is used to organize files on a computer system. On <a href="linuxdef.html">Linux</a> and other <a href="unix-like.html">Unix-like</a> <a href="operating_systems_list.html">operating systems</a>, at the very top of this hierarchy is the <a href="root_directory.html"><i>root directory</i></a>, which contains all other directories on the system, inclusive of their subdirectories, etc. A variant of this definition is the part of the entire hierarchy of directories (i.e., of the directory tree) that is located on a single <a href="partition.html"><i>partition</i></a> or disk. A partition is a logically independent section of a hard disk drive (HDD). </p> <p> The mount point becomes the root directory of the newly added filesystem, and that filesystem becomes accessible from that directory. Any original contents of that directory become invisible and inaccessible until the filesystem is <i>unmounted</i> (i.e., detached from the main filesystem). </p> <p> The <i>default mount points</i> for a system are the directories in which filesystems will be automatically mounted unless told by the user to do otherwise. They are listed in <i>/etc/fstab</i>, which is a <a href="plain_text.html">plain text</a> configuration file that contains information about the major filesystems on a computer. The first column in /etc/fstab shows the <i>device</i> (i.e., the partition or disk), and the second column shows its default mount point. The contents of /etc/fstab can easily, and safely, be viewed with a <a href="command.html">command</a> such as <a href="cat.html"><i>cat</i></a> as follows: </p> <blockquote> <p> <code>cat /etc/fstab</code> </p> </blockquote> <p> The mount points for devices listed in /etc/fstab can easily be changed with a text editor such as <i>gedit</i> or <a href="vi/index.html"><i>vi</i></a>. <a href="root.html"><i>Root</i></a> (i.e., administrative) permission is required, and it can be conveniently acquired on a home computer (or other computer over which the user has complete control) by using the <a href="su.html"><i>su</i></a> (i.e., <i>substitute user</i>) command and entering the root password. As it is easy to damage /etc/fstab so that a system will not <a href="boot.html"><i>boot</i></a> (i.e., start up) properly, it is important to make a backup copy before attempting to edit it. </p> <p> For example, external <a href="storage.html">storage</a> media (e.g., CDROMs and floppy disks) are usually mounted in subdirectories of the <a href="mnt.html"><i>/mnt</i></a> directory (i.e., <i>/mnt/cdrom</i> and <i>/mnt/floppy</i>), but they could instead be mounted by default in any other directory created by the user (e.g., <i>/cdrom</i> or <i>/mnt/disk</i>) and recorded into the mount point column. </p> <p> After a computer has completed booting, devices other than those that are mounted automatically can be mounted either at existing mount points or at new mount points. For example, if it is desired to mount a partition named <i>/dev/hda5</i> (which is the fifth partition on the first HDD), a new directory could be created for it, such as <i>/par5</i> or <i>/home/p5</i>, and then that partition could be mounted using the <i>mount</i> command, i.e., </p> <blockquote> <p> <code>mount /dev/hda5 /par5</code> </p> </blockquote> <p> If it is desired to have devices mounted at such new mount points automatically at boot time, the corresponding data can be added to /etc/fstab. </p> <p> The concept of mount points can seem confusing to new users because they have not had to be concerned with mounting when using the Microsoft Windows operating systems. Those systems have avoided user mounting at the cost of a loss of flexibility of system configuration. </p> <p> Another reason that it can seem confusing is that the term implies a <i>point</i>, whereas it is actually a directory. Directories are usually thought of as being <i>containers</i> (i.e., for holding other directories and files) rather than as points. However, the concept can become clearer if directories are instead visualized as <i>nodes</i>, i.e., as points, on a tree diagram of a filesystem from which other directories and files can branch off rather than as containers. </p> <p><br /></p> <p><br /></p> <p><br /></p> <p><br /></p> <p><br /></p> <p class="copy">Created March 4, 2006.<br /> Copyright © 2006 The Linux Information Project. All Rights Reserved.</p> </td><td width="10%"></td></tr></tbody></table> </body></html>