Mounting Disk Images From OS X Terminal


Sometimes, to install software on my remote Mac Mini, I need to be able to mount disk images from a terminal session.

I just discovered how to do this. The command is hdiutil.

To mount a disk image:

hdiutil attach SomeDiskImage.dmg

Although I haven't tried it, I believe the disk image can be referenced by URI.

To unmount:

hdiutil detach /Volumes/SomeDiskImage/

I've added this to my Headless Tiger page.

The original post was in the category: os_x but I'm still in the process of migrating categories over.

The original post had 6 comments I'm in the process of migrating over.