MDLUG Newbie Pages

Linux Newbie FAQ.
Q: What's a mount point and how do I make one?
      or   (Dude, where's my C: drive?)

A: In Linux, and *nix in general, mount points serve a function similar to that of drive letters on other operating systems: they provide a mechanism for refering to the different disk drives (and other file systems) that may be available on your system.

Linux uses one big directory tree for all disks drives, and in fact all resources accessed by the system. Mount points, which are always directories, are the places within this tree where one file system meets (or gets "mounted on") another. These file systems are usually found, with a couple of notable exceptions, on hard drive partitions, floppy disks, cdroms, or other such media. Your boot loader must tell the OS what file system to mount as system root (/). This system root (not to be confused with the root users home directory "/root/") is usually a hard drive partition, but can be elsewhere. For instance a cdrom based "live" system, may created a file system on a ram drive, in memory, to be used as the system root.

If you have (a really old version of) linux installed you might have directories: /floppy/ and /cdrom/ that are available off your system root (/). When there is no floppy mounted the /floppy/ directory would be empty. It certainly should be.

If you insert a floppy disk and issue the command:

    mount /floppy

(or click on a floppy icon on your desktop, which does the same thing) you should see the floppy drive light come on for a moment, then go out. Once mounted you can access any files on the floppy disk inside it's mount point directory, /floppy/. If there is a file README.txt on the floppy disk you would refer to it as /floppy/README.txt . This example assumes that the file README.txt is in the root directory of the floppy disk. Notice that the directory /floppy/ itself is part of your root file system, and even without a floppy disk mounted the /floppy/ directory can still be written to. In this case you would just be writing files to your root file system. They would appear in the directory /floppy/ until you actually mounted a floppy. Then those files would be inaccessible.

Placing the mount points for removable media directly in the system root has been depricated for several years. I prefer to mount floppies and cdroms at /mnt/floppy and /mnt/cdrom. The directory /mnt already existed, and creating these mount points is simple:

    mkdir /mnt/floppy

and

    mkdir /mnt/cdrom

Making these mount points the defaults for these devices required editing a configuration file, /etc/fstab , and that is a whole other subject.

Some newer distros place the floppy and cdrom mount point directories in /media/ .

The DOS-WIN to Linux HOWTO, makes good reading for a newbie who is familiar with either of these operating systems. As far as the man page system goes, the manual for the man system itself:
    man man
is a good starting point. Then "man mount", "man df" and "man fstab" are good companions. From there "man cd" takes you to a page where a lot of built in commands are explained.