How to Convert DMG Images to ISO Easily with hdiutil
If you have ever wanted to turn a DMG file into an ISO file, look no further than the handy command line utility called hdiutil, which is bundled in all versions of OS X. This can be helpful for many reasons, but one of the primary reasons to convert a DMG to ISO is for compatibility. Perhaps your Mac doesn’t have a writable media drive, or it’s not up to speed, or the multitude of other reasons you’d want to have or burn an ISO from a PC rather than a DMG on your Mac.
Forget downloading the shareware apps that promise to convert DMG files to ISO, you can do it right from Mac OS X’s command line, for free, using the hdiutil command as outlined below.
The syntax to enter into the Terminal is as follows:
hdiutil convert imagefile.dmg -format UDTO -o imagefile.iso
This will actually create a file called imagefile.iso.cdr in the current directory, but you can replace the image files with their appropriate paths and a target destination, for example:
hdiutil convert ~/Downloads/Installer.dmg -format UDTO -o ~/Desktop/Installer.iso
You may notice the output includes a ‘.cdr’ extension on the iso file, but you’ll want to change that to just .iso, this is easily done with the mv command as follows:
mv imagefile.iso.cdr imagefile.iso
That’s all there is to it, now your DMG image file is an ISO, and it can be copied, burned, or used on any Mac or any PC with the proper hardware.
By the way, if you’re not much of a command line user, you can perform disk image conversions from cdr, dmg, and iso, with Disk Utility, which is a GUI app bundled with all versions of OS X and all Macs.