Why are executables called DMG (disk image) files?

Solution 1:

.dmg files are disk images, similar to an .iso file.

You can think of them like a virtual CD. You put it into the CD drive (mount it), and its contents appear on your computer.

When used for software downloads, they are simply a way to bundle up files, like in a ZIP archive. Their advantage is that it's possible to customize the design (e.g. Finder window background and icon positions, see example below).


The actual program is in a special bundle or package directory with the usually invisible extension .app. It contains an application's resources, like image files, and the actual binary (the ".exe equivalent") that is executed when you start the program. If you want to compare it to a Windows equivalent, the closest would probably be the folder in C:\Program files\ created by a program's installer.

To install such an application from a disk image, you drag and drop it to your hard drive, e.g. the Applications directory. That's what a lot of disk images try to convey in their disk image design: You grab the application, Adium in this case, and drag it onto the Applications folder:

Solution 2:

Straight answer.

.dmg files are not equivalent to executables on Windows. A .dmg is also known as an Apple Disk Image. It is a compressed storage and delivery bundle format often used for installer packages, although it can have other functions. Very loosely speaking, a .dmg is more like a .zip, .rar, .gz or .tar file.

The Mac OS X equivalent of an Executable is an application, and it ends in .app

There is a Wikipedia entry on Apple Disk Image at this link.

It says, in part:

The [.dmg] format allows secure password protection as well as file compression and hence serves both security and file distribution functions; it is most commonly used to distribute software over the Internet. Universal Disk Image (UDIF) is a flat file format, and is the native image format for Mac OS X.