Tuesday, March 23, 2010

How to mount devices in Linux

In unix systems, mounting is a way to attach a directory to a device.

Here are some example of mount command:

  1. mount floppy - mount /dev/fd0
  2. mount floppy in a desired folder - mount /dev/fd0 /home/user/floppy
  3. mount cdrom - mount /dev/cdrom
  4. mount cdrom in a desired folder - mount /dev/cdrom /home/user/cdrom
If you have an iso file and you want to mount it, you will have to add "-o loop" after the mount command:

- mount -o loop /home/user/image.iso /home/user/cdrom

For unmounting the device you will have to write the command umount and the location of the devices:
  1. umount /dev/fd0
  2. umount /dev/cdrom
  3. umount /home/user/image.iso

No comments:

Post a Comment