Mount/Unmount

This section will discuss how to mount or unmount a file system. The file systems on your hard drives are normally mounted as a part of the boot process. Typical the only file systems you manually mount or unmount are for the CD and floppy drives.

mount

  • The mount command allows a file system to be accessed.
  • You must know know the device name where the file system resides and have a directory already created that is used to access the file system.
  • For a CD, the typical device is /dev/sud0 and the directory is /cdrom.
  • For a floppy, the typical device is /dev/fd and the directory is /floppy.

Examples:

  • mount /dev/sud0 /cdrom – Mounts the file system /dev/sud0 in the directory /cdrom
  • mount /dev/fd /floppy – Mounts the file system /dev/fd in the directory /floppy

Note: The command df displays mounted file systems and the directory they are mounted in.

umount

The umount disables the access to a file system. If you mounted a CD, you will not be able to open the CD tray until you un-mount the CD file system. To un-mount, you only need to know the directory for the mounting point.

Example: umount /cdrom