• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to mount an iso file in Linux

by admin

ISO files are whole disk images. They are a single image file that are used for burning to CD-ROM. In order to access the files inside the iso file, you need to mount it as a ‘Loop Device’. A loop device, vnd (vnode disk), or lofi (loopback file interface) is a pseudo-device that makes a file accessible as a Block device.

We can mount ISO files in the same way that we mount physical disks using loopback mounting.

Creating directory to mount ISO

we need an empty directory for the iso to be mounted at. Once iso is mounted onto the directory the contents of ISO can be accessed by the OS users.

1. switch as root user.

2. Create a directory to mount iso image on :

# mkdir /iso_image
NOTE: We can even use a nonempty directory as the mount path. Then, the mount path will contain data from the devices rather than the original contents, until the device is unmounted.

Mounting ISO as loopback

1. Change directory to the location of the iso image.

# cd /path/to/iso/dvd.iso

2. Mount the image with mount command :

# mount -o loop dvd.iso /iso_image

Here, “-o loopback” mounts the ISO image as loop device on the directory you specified.

Verify

1. Once you have mounted the ISO, verify the content of the directory :

# cd /iso_image  
# ls /iso_image

2. You can also view the mount point in the “mount” command.

# mount
/path/to/iso/dvd.iso on /iso_image  type iso9660 (ro)

The iso image mounted here will be read-only, so you can not edit any of the files inside the mount point /iso_image.

Umounting ISO image

To umount an iso image, use the “umount” command as shown below :

# umount /mnt

Filed Under: Linux

Some more articles you might also be interested in …

  1. How to calculate recommended value of vm.min_free_kbytes Kernel Tuning Parameter
  2. Linux OS Service ‘squid’
  3. How to Configure Persistent Names for Tape Devices in CentOS/RHEL
  4. mkfs.vfat Command Examples in Linux
  5. Linux OS Service ‘acpid’
  6. How to Create and Manage Storage Domains in RedHat Virtualization (RHV)
  7. debuild Command Examples in Linux
  8. deborphan: command not found
  9. ndctl Command Examples in Linux
  10. “Warning: Missing charsets in String to FontSet conversion” – how to resolve the xclock warning message

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright