• 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. featureCounts: command not found
  2. How to use “xfs_admin” command to change parameters of an XFS filesystem
  3. How to set ulimit values for a systemd service
  4. Examples of creating command alias in different shells
  5. Understanding OpenSSH Configuration Files
  6. Unable To Boot Up Linux OS with Auditd (CentOS/RHEL)
  7. How to Create Disk Partitions using cfdisk
  8. How to Trace Python Scripts using trace.py
  9. “java” command does not run the JVM that has been installed
  10. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on non-LVM device (hard disk partition)

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright