How to guides and technology tutorials for Amazon AWS, Google Cloud, Linux, macOS, Windows, and other systems

How to mount and unmount disk ISO and DMG images on macOS

Published: 09 July 2014
Filed Under: macOS

You can use hdiutil to manually mount and unmount disk images, using the commands below. When mounting a file, make sure you replace filename with the correct file name. The same command works for both DMG and ISO files. When unmounting a disk image, be sure to replace disk1s1 with the correct volume identifier that will be shown to you after you mount the image.

Mount a DMG or ISO file

hdiutil attach filename.iso

Unmount the disk image

hdiutil detach /dev/disk1s1