What is DMG?
A DMG file is a mountable disk image created for macOS. When opened, it appears as a mounted volume on the desktop, containing files and folders just like a physical disk. DMG files are commonly used to distribute software and can include custom backgrounds, icons, and license agreements.
DMG files replaced the older IMG format in Mac OS X and support advanced features like compression, encryption (password protection), and checksums for data integrity verification.
History
The DMG format was introduced with Mac OS X 10.0 in 2001 as part of Apple's transition to a Unix-based operating system. It replaced the older IMG and NDIF formats used in Mac OS 9.
Key Milestones
- 2001: DMG format introduced with Mac OS X 10.0
- 2003: Mac OS X 10.3 adds encrypted DMG support
- 2005: Mac OS X 10.4 introduces sparse disk images
- 2016: macOS Sierra improves DMG security verification
- 2018: macOS Mojave requires notarization for DMG files
Key Features
Core Capabilities
- Virtual Mounting: Appears as a real disk when opened
- Compression: Multiple compression methods (zlib, bzip2, LZFSE)
- Encryption: 128-bit and 256-bit AES encryption
- Checksums: Built-in CRC32 and MD5 verification
- Custom Layout: Custom backgrounds and window arrangements
- Code Signing: Apple Developer ID signatures
Common Use Cases
Application Distribution
Standard format for Mac software installers
Encrypted Storage
Password-protected secure file containers
System Backups
Complete disk images for backup and recovery
macOS Installation
Operating system installers and updates
Advantages
- Native macOS support (double-click to mount)
- Excellent compression reduces file size
- Strong encryption for security
- Supports custom installer UI
- Code signing for verified distribution
- Automatic integrity verification
Disadvantages
- macOS only (limited cross-platform support)
- Proprietary format
- Requires third-party tools on Windows/Linux
- Can be large files despite compression
- Not suitable for non-Mac users
Technical Information
Format Specifications
| Specification | Details |
|---|---|
| File Extension | .dmg |
| MIME Type | application/x-apple-diskimage |
| Developer | Apple Inc. |
| Format Type | Disk Image |
| Compression | zlib, bzip2, LZFSE |
| Encryption | 128-bit or 256-bit AES |
Common Tools
- macOS: Disk Utility (built-in)
- Windows: 7-Zip, DMG Extractor
- Linux: dmg2img, 7z