The Macintosh Disk Image files which are otherwise known as DMG images are ISO image equivalent for Apple's Macintos operating systems. The DMG images have a different filesystem called the HFS. In this article we will tell you how to mount dmg images in Linux.
You can use the following command in a Terminal to mount the dmg image:
sudo mount -t hfs -o loop filename.dmg /media/iso
This command will mount a dmg image called filename.dmg in a folder named /media/iso. In case you get an error you can use the hfsplus option instead of the hfs option as shown below. This one also will have similar mounting effects and is generally applicable to newer dmg image files.
sudo mount -t hfsplus -o loop filename.dmg /media/iso
The above two commands may not work correctly if you do not have proper support installed on your system for reading hfs or hfsplus. Generally this wont happen, so you need not worry. Some times the dmg file may not be a true dmg image instead it may be a zipped image. You can use the file command to check whether the dmg image you are trying to mount is an actual dmg image or not.