Installing from dmg on mac from command line

you don’t have to do this from command line as there is slick User Interface to do it. Actually, the moment you download your dmg [disk image] and double click on it, it will mounted on your system and then you can drag the icon to the application folder and boom.. you are done on installing.
This is incase if you, for whatever reason, wanted it to be done from command line.

Let’s say you downloaded a file somefile.dmg
Go to your terminal, move to the downloaded file’s folder and type

hdiutil mount somefile.dmg

This will be accompanied by the /Volume/dis-image-name confirmation from the command line.
Now search move to the newly mounted disk and copy the app file to the /Applications

cp -R /Volumes/some-file-folder/somefile.app /Applications

Yup that is it!

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*