ISO image files provide a convenient way to distribute installers, live systems, and archives without relying on physical media like CDs or DVDs. Access to the contents of an .iso file permits browsing documentation, extracting individual packages, or verifying checksums before reuse.
On Linux, ISO images normally contain an ISO 9660 filesystem and are attached through the mount command. When bound to a directory as a loopback device, the image behaves like a read-only optical drive, and its directories and files appear under the chosen mountpoint.
Mounting an ISO image is a privileged operation and typically requires sudo access because it alters the system's view of attached filesystems. Mounting to a dedicated temporary directory and unmounting cleanly after use prevents stale mounts, avoids accidental writes in the wrong location, and keeps filesystem navigation predictable.
$ pwd /
$ mkdir -p /root/sg-work/iso-demo/mnt
$ cd /root/sg-work/iso-demo
$ file demo.iso demo.iso: ISO 9660 CD-ROM filesystem data 'DEMOISO'
The file command inspects the image header and reports the detected partitioning and filesystem format.
$ sudo mount -t iso9660 -o loop demo.iso /root/sg-work/iso-demo/mnt mount: /root/sg-work/iso-demo/mnt: WARNING: source write-protected, mounted read-only.
The mounted filesystem is read-only; files can be viewed or copied but not modified in place.
$ ls -l /root/sg-work/iso-demo/mnt total 1 -r-xr-xr-x 1 root root 17 Jan 14 00:17 readme.txt -r-xr-xr-x 1 root root 27 Jan 14 00:17 release
$ head /root/sg-work/iso-demo/mnt/release Release: Demo Version: 1.0
Files read from the mountpoint behave like regular files; use standard tools such as cp, less, or tar to inspect or extract content.
$ cd
Unmounting a filesystem that is in active use can fail with a target is busy error.
$ sudo umount /root/sg-work/iso-demo/mnt
$ rmdir /root/sg-work/iso-demo/mnt