How to Mount and Unmount an ISO Image in RHEL/CentOS/Fedora and Ubuntu

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.

How to mount iso image in linux

mount and unmount iso images in linux

I have seen most of the Linux operating system that we download from the internet are .ISO format. Typically an ISO image contains installation of software’s such as, operating system installation, games installation or any other applications. Sometimes it happens that we need to access files and view content from these ISO images, but without wasting disk space and time in burning them on to CD/DVD.

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/tecmint/Fedora-18-i386-DVD.iso /mnt/iso/

OR

$ sudo mount -t iso9660 -o loop /home/tecmint/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
Where Options
  1. -t : This argument is used to indicate the given filesystem type.
  2. ISO 9660 : It describes standard and default filesystem structure to be used on CD/DVD ROMs.
  3. -o : Options are necessary with a -o argument followed by a separated comma string of options.
  4. 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.

Read Also : How to Mount Windows NTFS Partition in Linux

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

21 Responses

  1. nsu2015 says:

    to mount iso permanently can i write this line to fstab?
    mount -t iso9660 -o loop /patch/to/image.iso /mnt/path

    • nsu2015 says:

      in rhel 6

    • Ravi Saive says:

      @nsu2015,
      Yes, it should work…go ahead..

      • nsu2015 says:

        but i have a problem
        in fstab i first add a line to auto mount an NTFS drive using ntfs-3g and it worked properly
        the iso image is in this NTFS drive and the above line (mount -t iso9660 -o loop /patch/to/image.iso /mnt/path) is added after NTFS.
        the ntfs drive mount on startup but the iso file not
        could you please help

        • Ravi Saive says:

          @Nsu2015,
          You can use following line to /etc/fstab file to auto mount your ISO file permanently at system startup.

          /patch/to/image.iso /mnt/path iso9660 loop 0 0
          
  2. Nitin says:

    Thank you so much. I am a newbie in linux and his was of great help to me.

  3. james says:

    Hi ,can anyone guide me how can i create ISO image form Operating System.

  4. subrahmanyam says:

    Hi ,
    Can you help me to how to create iso image on Centos5.7 as well as rpm files.

    • Ravi Saive says:

      @Subrahmanyam,
      The given instructions works on CentOS 5.7 to create ISO images..I didn’t understand your question “as well as rpm files”?

  5. Sandeep Bavuna says:

    Hi,

    If I have two iso images, how can i mount both together ? Does it work ?

    • Ravi Saive says:

      No, that’s not possible, you can mount one iso at a time under /mnt.

      • Roberto Nunin says:

        Hi

        it is not possible to have two images mounted at the same time under /mnt folder, but you are free to create how many subfolders you want under /mnt and adjust the mount command to use these subfolders.

        mount -t iso9660 -o loop /patch/to/image1.iso /mnt/path1
        mount -t iso9660 -o loop /patch/to/image2.iso /mnt/path2
        etc.

        BR
        Roberto

  6. Jitendra says:

    Dear Sir

    I am new to linux, your site is help full for how are new to linux. I kindly request please do a tutorial on open vpn and ip tables.

    If you are providing training please let us know. If you are providing training videos also please let us know, not an issue we will pay and purchase from your site.

    • Ravi Saive says:

      Your request accepted, will soon write a complete guide on how to install OpenVPN in Linux, till then stay tuned for updates. We don’t provide any training, but we do provide paid services for Linux.

  7. vinoth says:

    Hi there,
    I would like to know how to locate my rhel6 iso image in D DRIVE. Can u say me how to change the mount command

  8. Sushanta says:

    I want to do permanent mounting, so that i don’t have to run mount command again and again

    help plz

  9. Hassan Parthasarathy says:

    That worked, Thanks !!
    Partha

  10. William says:

    Worked like a charm, thanks!

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.