Opening DMG disk images via Terminal

You can open disk images via Terminal using the following command:

hdiutil attach /path/to/image.dmg

Good to know: you can also specify a HTTP URL to open the disk image directly from the web, without downloading it.

When you're done, you can unmount the disk image like any normal volume:

diskutil unmount /Volumes/VOLUME_NAME