An ISO image or .iso (International Organization for Standardization) file is an archive file that contains a disk image called ISO 9660 file system format. Every ISO file have .ISO extension has defined format name taken from the ISO 9660 file system and specially used with CD/DVD Rom’s. In simple words an iso file is a disk image.
This article describes how to mount and unmount an ISO image on a Linux Operating system to access and list the content of files.
How to Mount an ISO Image
To mounting an ISO image on Linux (RedHat, CentOS, Fedora or Ubuntu), you must be logged in as “root” user or switch to “sudo” and run the following commands from a terminal to create a mount point.
# mkdir /mnt/iso OR $ sudo mkdir /mnt/iso
Once you created mount point, use the “mount” command to mount an iso file called “Fedora-18-i386-DVD.iso“.
# mount -t iso9660 -o loop /home/norbertk/Fedora-18-i386-DVD.iso /mnt/iso/ OR $ sudo mount -t iso9660 -o loop /home/norbertk/Fedora-18-i386-DVD.iso /mnt/iso/
After the ISO image mounted successfully, go the mounted directory at /mnt/iso and list the content of an ISO image. It will only mount in read-only mode, so none of the files can be modified.
# cd /mnt/iso # ls -l
You will see the list of files of an ISO image, that we have mounted in the above command. For example, the directory listing of an Fedora-18-i386-DVD.iso image would look like this.
total 16 drwxrwsr-x 3 root 101737 2048 Jan 10 01:00 images drwxrwsr-x 2 root 101737 2048 Jan 10 01:00 isolinux drwxrwsr-x 2 root 101737 2048 Jan 10 01:00 LiveOS drwxrwsr-x 28 root 101737 4096 Jan 10 00:38 Packages drwxrwsr-x 2 root 101737 4096 Jan 10 00:43 repodata -r--r--r-- 1 root root 1538 Jan 10 01:00 TRANS.TBL
How to Unmount an ISO Image
Simply run the following command from the terminal either “root” or “sudo” to unmount an mounted ISO image.
# umount /mnt/iso OR $ sudo umount /mnt/iso
- -t : This argument is used to indicate the given filesystem type.
- ISO 9660 : It describes standard and default filesystem structure to be used on CD/DVD ROMs.
- -o : Options are necessary with a -o argument followed by a separated comma string of options.
- loop: The loop device is a pseudo-device that often used for mounting CD/DVD ISO image and makes those files accessible as a block device.