Mounting OSX .DMG images from shell

This is an easy way to mount OS X installer packages (.dmg files) from the command line tool.

First of all, you must have your .DMG file, or you can download it still using the shell.

To download with command line use the curl command:

MacMini>curl http://web.address.pointing.to/the/file/to/download.dmg > myFile.dmg

Then to mount the image use the following command:

MacMini> hdid myFile.dmg

That’s all!

Author: Mauro

A tech blog

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s