Ubuntu – How to open a .dmg file

archivefile formatfiles

I've got a .dmg file, and I can't figure out how to open it. How can I open it?

Best Answer

Install dmg2img Install dmg2img.

Next, read the package information page and the manual page to see if it is useful to you.

The application seems to convert .dmg to a file that can be mounted using the mount command:

dmg2img file.dmg imagefile.img

From your Wikipedia article, the next command seems to be available to do that:

sudo mount -o loop -t hfsplus imagefile.img /mnt

In this way, the file imagefile.img is a result from dmg2iso and the contents will be available at /mnt. If the hfsplus type is not detected, you might need to load the kernel module for it:

sudo modprobe hfsplus

When done, you can unmount it by running:

sudo umount /mnt
Related Question