How to Open DMG Files on Mac

A DMG file is an Apple disk image, the format most Mac apps are downloaded in. You do not need any extra software to open one: macOS mounts it with a double click, and Finder shows its contents like a USB drive. This guide covers opening a DMG in Finder, installing the app inside, ejecting it, the hdiutil commands for Terminal, and what to do when a DMG will not mount. One thing up front: UnFox, our free unarchiver for Mac, iPhone, and iPad, does not open DMG files, because they are disk images rather than archives and macOS already handles them well. UnFox is for real archives such as ZIP, RAR, and 7Z.

What Is a DMG File?

A DMG (Apple Disk Image) is a single file that contains a complete virtual disk: a partition map and a filesystem, usually HFS+ or APFS. Developers use it to ship Mac apps because it holds an app bundle together with a background picture and a shortcut to the Applications folder, and because macOS can verify it with a checksum. Most DMG files are compressed and read only. The common variants are UDZO (zlib compressed), UDBZ (bzip2), ULFO (lzfse), and ULMO (lzma). A DMG can also be encrypted with AES-128 or AES-256, or show a license agreement before it opens. Because a DMG is a disk and not an archive like ZIP, the right way to open it is to mount it, which macOS does natively.

Can UnFox Open DMG Files?

No. UnFox does not open DMG files. DMG is a disk image format, not an archive format, and the libarchive engine inside UnFox has no reader for it. macOS mounts DMG files itself, so the Finder and Terminal methods below are the right tools. UnFox is built for archives: it extracts ZIP, RAR, 7Z, TAR.GZ, ISO, XAR (.pkg), and the rest of its 35 archive and compression formats on Mac, iPhone, and iPad. If a DMG contains a ZIP or RAR file, mount the DMG first, copy the archive out, and then extract it with UnFox.

Note

A DMG that arrives inside a ZIP (common with some downloads) is the reverse case: extract the ZIP first, then double click the DMG.

How Do You Open a DMG File in Finder?

Double click the .dmg file, usually in your Downloads folder. macOS verifies the image, then mounts it: a new volume appears on the desktop and in the Finder sidebar under Locations, and a Finder window opens with its contents. If the DMG includes a license agreement, click Agree first. If it is encrypted, macOS asks for the password. The mounted volume is read only, so you can open and copy files from it but not change them.

Tip

If nothing seems to happen after a double click, look in the Finder sidebar under Locations. The volume is often already mounted from an earlier attempt.

How Do You Install an App from a DMG?

Most app DMGs show the app icon next to a shortcut to the Applications folder. Drag the app icon onto that shortcut and wait for the copy to finish. If there is no shortcut, open a second Finder window and drag the app into Applications yourself. Then open the app from Applications or Launchpad, not from the mounted volume, because an app started from the DMG disappears when the image is ejected and macOS may run it from a temporary location. Some DMGs contain a .pkg installer instead of an app: double click it and follow the installer. To see what a .pkg would install before running it, you can open XAR files on Mac, since .pkg files are XAR archives that UnFox extracts. After installing, eject the disk image and delete the .dmg file to free the space. The installed app keeps working.

How Do You Eject a DMG on Mac?

Click the eject button next to the volume name in the Finder sidebar, or right click the volume on the desktop and choose Eject, or drag the volume icon to the Trash (it turns into an eject symbol). Keyboard users can select the volume and press Cmd+E in Finder. If macOS says the disk is in use, quit the app or close the file that is still open from the volume and try again. Ejecting only unmounts the image; the .dmg file itself stays where it was until you delete it.

How Do You Open DMG Files Using Terminal?

macOS includes hdiutil for working with disk images. "hdiutil attach file.dmg" mounts the image and prints the mount point, usually under /Volumes/. Add "-nobrowse" to mount it without showing it in Finder, which is handy in scripts. Copy files out with cp or ditto, then unmount with "hdiutil detach /Volumes/VolumeName". To inspect a DMG without mounting it, "hdiutil imageinfo file.dmg" shows the image format (for example UDZO), compression, size, and partition layout, and "hdiutil verify file.dmg" checks its built in checksum. To get a writable copy, convert it with "hdiutil convert file.dmg -format UDRW -o writable.dmg". For a .pkg inside the mounted image, "pkgutil --expand-full package.pkg output_dir" unpacks the installer so you can read its scripts and payload.

What to Do When a DMG File Will Not Open

Most DMG problems come from incomplete or damaged downloads. "Image not recognized" or a checksum error during verification means the file is corrupt: delete it and download it again, ideally from the developer's own site, and compare the size with what the site lists. If the developer publishes a SHA-256 checksum, compare it with "shasum -a 256 file.dmg" in Terminal. "No mountable file systems" means macOS could not read the filesystem inside. This usually also points to a broken download, but it can happen when an APFS formatted DMG is opened on a very old macOS version; run "hdiutil verify file.dmg" to tell the two apart. "Resource busy" means the image is already mounted or still in use, so eject it in Finder (or run "hdiutil detach") and try again. If macOS says the app "cannot be opened because Apple cannot check it for malicious software", the download is not notarized. Only continue for software you trust: go to System Settings, then Privacy & Security, scroll down, and click Open Anyway.

Can You Open DMG Files on iPhone or iPad?

Not in a useful way. iOS and iPadOS cannot mount disk images, and the Files app shows a DMG only as a file you can store or share. The content is almost always a Mac app, which would not run on an iPhone or iPad anyway. UnFox on iPhone and iPad does not open DMG files either. Move the DMG to a Mac with AirDrop or iCloud Drive and open it there. Archives are different: if you receive a ZIP, RAR, or 7Z file on iPhone, see how to unzip files on iPhone.

DMG Compared to ISO and Archive Files

DMG and ISO are both disk images: they contain a whole filesystem rather than a list of compressed files. ISO uses the ISO 9660 or UDF filesystem from optical discs and is the standard for Linux and Windows installation media. macOS can mount both, but ISO is also readable as an archive, so UnFox extracts ISO contents to a folder in one step, as covered in how to open ISO files on Mac. Archives such as ZIP, RAR, 7Z, and TAR.GZ are built to be unpacked rather than mounted, and that is the job UnFox does on Mac, iPhone, and iPad, free, with no ads and no account.
Marcel Iseli
Marcel Iseli

Creator of UnFox · Indie Developer

LinkedIn ↗

Marcel Iseli is an indie developer and the creator of UnFox. He builds native macOS and iOS utilities focused on privacy, simplicity, and zero tracking. Based in Switzerland, every app he ships is free or a one time purchase, with no subscriptions and no data collection.

Frequently Asked Questions

Yes. macOS opens DMG files natively. Double click any .dmg file in Finder to mount it, then copy or install what is inside and eject the volume when you are done.
No. DMG files are disk images, not archives, and UnFox does not open them. macOS mounts them with a double click. UnFox extracts archives such as ZIP, RAR, 7Z, TAR.GZ, and ISO.
Yes. Once the app is copied to the Applications folder, eject the mounted volume and move the .dmg file to the Trash. The installed app does not need it.
DMG files from the developer's official website are generally safe, and macOS Gatekeeper checks the code signature and notarization of the app inside when you first open it. Be careful with DMG files from unknown sources, and never bypass the Gatekeeper warning for software you do not trust.
Double click the DMG in Finder. macOS asks for the password and then mounts the disk image. In Terminal, "hdiutil attach file.dmg" prompts for the password as well.