In UNIX, as opposed to windows, there is only one directory tree, starting from the root directory (/). The root directory is mapped (or mounted) to some disk partition. Other partitions may be mounted instead of any existing directory in the file-system. Mounts may be used to separate system directories to different disks, or to access foreign (Windows, floppy, CDROM, ...) file-systems. Foreign file-systems are usually mounted under /mnt.
The default mount locations of partitions are defined in a file called /etc/fstab (file-system table). The file looks like this:
/dev/hda8 / reiserfs notail 1 1
none /dev/pts devpts mode=0620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/cdrom /mnt/cdrom auto user,umask=0,exec,ro,noauto 0 0
/dev/fd0 /mnt/floppy auto user,umask=0,sync,exec,noauto 0 0
/dev/hda1 /mnt/win_c vfat defaults 0 0
/dev/hda5 /mnt/win_d vfat defaults 0 0
none /proc proc defaults 0 0
none /tmp tmpfs defaults 0 0
/dev/hda6 /usr ext3 defaults 1 2
/dev/hda7 swap swap defaults 0 0
The first column is the device (or partition) to mount, or none for special file-systems. /dev/hda is the first physical hard-disk, and the number is the partition number. To find out your partition list and manipulate partitions use cfdisk or fdisk as root. WARNING: fdisk is a dangerous command and should be used with extreme caution.
The second column is the mount point, the location in the directory tree where the mounted file-system starts. swap is a partition used for virtual memory.
The third column is the file-system type, or auto which results in auto-detection.
The fourth column is for mount options. For more information on these options and the meaning of the next columns see the man pages for mount andfstab.
Originally written by