I want to convert an .iso to .dmg, how can I do this from Terminal?
Asked
Active
Viewed 1.2k times
4
nohillside
- 100,768
bomben
- 1,083
-
Possible duplicate of Creating A Bootable USB Of Windows 8.1 On OS X? – Allan Feb 05 '17 at 12:31
-
It's the same question and same answer just yours is more general in scope. There is also this question: http://apple.stackexchange.com/questions/73183/copying-iso-file-to-usb-drive-in-os-x – Allan Feb 05 '17 at 12:50
-
1Related: http://apple.stackexchange.com/questions/94330/how-can-i-convert-a-dmg-to-iso-on-mac-os-x-preferably-for-free – nohillside Feb 05 '17 at 15:20
1 Answers
6
OS X has hdiutil, a command line tool for making, manipulating and using disk images with an option to convert between different types of images.1
To do this use the command with verb convert and option -format.
Option -o is used to specify the path and name of the output file.
There are several formats available from which I post two for .DMG and one for .ISO:
UDRW - UDIF read/write image
UDRO - UDIF read-only image
UDTO - DVD/CD-R master for export
Use the first one for a read/write-able .DMG. The resulting command is:
hdiutil convert /path/file.iso -format UDRW -o /path/file.dmg
The backward conversion would be done by
hdiutil convert /path/file.dmg -format UDTO -o /path/file.iso
bomben
- 1,083
-
Here's a nice use case for the opposite direction - Mac installers are DMG and some software wants an ISO (VMware / Parallels / etc...) - http://apple.stackexchange.com/questions/278336/generalizable-gude-to-convert-dmg-to-iso-bootable-for-lion-to-sierra – bmike Apr 01 '17 at 17:43