1. Home
  2. Computing & Technology
  3. Linux

Example uses of the Linux Command mount
An Introductory Tutorial

By , About.com Guide

The following examples illustrate typical uses of the command mount for attaching the file directory of a device or partition to the file directory tree of the Linux system.

mount /dev/fd0 /mnt/floppy
This command will connect the device "/dev/fd0" (usually the floopy drive) to the directory "/mnt/floppy" so that you can access the files and directories (folders) on the floppy disk in the floppy drive under the "/mnt/floppy" directory. The directory "/mnt/floppy" is also called the "mount point", which must already exist when this command is executed.

mount /dev/cdrom /mnt/cdrom
This command will connect the device "/dev/cdrom" (usually the CD ROM drive) to the directory "/mnt/cdrom" so that you can access the files and directories on the CD ROM disk in the CD ROM drive under the "/mnt/cdrom" directory, which must already exist when this command is executed.

umount /mnt/floppy
This command unmounts the floppy drive. After this command is executed the files and directories on the floppy will no longer be accessible from the directory tree of the Linux system.

umount /dev/fd0
This has the same effect as the previous command.

umount /mnt/cdrom
This command unmounts the CD ROM drive. After this command is executed the files and directories on the CD ROM will no longer be accessible from the directory tree of the Linux system.

umount /dev/cdrom
This has the same effect as the previous command.

The default mount points for the various devices are defined the file /etc/fstab. Some Linux distributions use a program called automount, which automatically mounts all the partitions and devices listed in /etc/fstab.

Complete syntax of the command: mount
Explore Linux
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux / Shell Commands
  5. Example uses of the Linux Command mount

©2009 About.com, a part of The New York Times Company.

All rights reserved.