5

Not entirely sure if this is where to ask this, but I can't find another place to...

I've recently switched from Windows to Mac and I am trying to understand more in depth what I'm working with.

My question is: are .dmg files the equivalent of .zip files in Windows? I came to this theory when downloading a .dmg and when I opened it, it contained a .app and and text file read me. To me, this seems like a compressed file.

Is this correct?

  • 1
    For Analogical purposes - a .dmg is much more similar to a .iso file than a .zip file. – Chirag Bhatia - chirag64 Aug 8 '16 at 8:11
8

A DMG file (Apple Disk Image) is a disk image file that is mounted as a volume, just like a physical disk. They can be password protected and compressed (like ZIPs), and are usually used for packaging and downloading Mac software (amongst other things).

DMGs are exclusively an Apple file format (though can be opened as read-only on Windows computers with 3rd party software), while a ZIP file is universal, and can be opened on both Mac and Windows. The nice thing about them is the ability to mount them, as I mentioned earlier. When you open a ZIP, it extracts the files to your computer, taking up more space on your hard drive. A DMG once mounted, however, can be interacted with and ejected without copying any files or taking up space on your hard drive.

@klanomath said it best in their comment on this answer, so I will quote them here:

All valid DMGs contain a file system - so they are mounted exactly like a real partition to a file system. They get their own device/disk identifier (like all disks) Check diskutil list after opening a DMG.

  • 1
    @Nick that is the "mounting" I mentioned; it is basically mounted as a volume in Finder. – ruddfawcett Aug 7 '16 at 21:19
  • 2
    I would love to improve or clarify my answer for the down voter? – ruddfawcett Aug 7 '16 at 21:25
  • 2
    @ruddfawcett I didn't downvote your question. A dmg is not necessarily compressed. The "almost "mounted"" is also debatable. All valid dmgs contain a file system - so they are mounted exactly like a real partition to a file system. They get their own device/disk identifier (like all disks) Check diskutil list after opening a dmg. – klanomath Aug 7 '16 at 22:12
  • 1
    I down voted originally but the edit has removed the errors - .dmg s are disk systems and only incidentally act like zip - i.e. tne opposite of your original last sentence – Mark Aug 7 '16 at 22:20
  • 1
    You might want to reword "DMGs are exclusively a Mac file format (a ZIP file is universal, and can be opened on both Mac and Windows)" as .dmg files can be accessed under Windows with the right software, albeit read-only. I'd also say it was an Apple file format. – user3439894 Aug 7 '16 at 22:54
0

The .dmg file can be seen as a parallel to the .iso image file (only in a smaller size).
You can mount this kind of image file:

  • (Windows) in a virtual drive and access it from there
  • (OSX) in /Volumes
  • DMG files aren't always smaller than ISO files, and to the best of my knowledge they can't be mounted in virtual drives on Windows (although I may be wrong.) – Faiz Saleem Feb 11 '17 at 2:06
  • I meant to say that this kind of image files can be mounted, .iso in Windows and .dmg in OSX. – ovisirius Feb 12 '17 at 10:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .