Open DMG File

Information, tips and instructions

Using hdiutil with DMG Files

Hdiutil is a helpful command line utility which allows to manipulate disk images. With hdiutil you can attach, detach, verify, burn and perform other actions with disk images.

Below are several examples of using hdiutil.

To attach (mount) example.dmg disk image type:

hdiutil mount example.dmg

When you mount disk image it will appear under /Volumes folder. If you want to mount disk image under a different path your can either use -mountroot or -mountpath options like in example below:

hdiutil mount -mountpath /Volumes/folder example.dmg

Unmounting disk image is similarly done by the following command:

hdiutil unmount /Volumes/example

You can also burn an image on CD or DVD by running:

hdiutil burn example.dmg

To create a disk image with hdiutil you can use the following command:

hdiutil create -encryption -size 10m -volname encdata test.dmg -fs HFS+J

If you need to create a disk image from specific folder type:

hdiutil create -volname DiskImageName -srcfolder /path/to/the/folder -ov -format UDZO example.dmg

Related File Types
Contact Us

DMG Quick Info
Apple Disk Image
MIME Type
application/x-apple-diskimage
Opens with
  • Disk Utility
  • hdiutil
  • 7-Zip
  • DMG Extractor

Open PDF File Translations: