A helpful command line tool called hdiutil is included in Mac OS X that allows disk image files (.dmg extension) to be mounted directly from the Terminal, without the need of using the GUI. Using hdiutil for such a task is helpful for scripting or remote connections through SSH. Mounting a Disk Image File (DMG) from the Terminal From the command line use the following syntax to mount the image: hd