Is there a command to install a dmg
I want to install a dmg file on a remote server. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format.
file
says my dmg file is a VAX COFF executable
.
First, mount the dmg image : sudo hdiutil attach <image>.dmg
The image will be mounted to /Volumes/<image>
. Mine contained a package which i installed with: sudo installer -package /Volumes/<image>/<image>.pkg -target /
Finally unmount the image: sudo hdiutil detach /Volumes/<image>
.
You should be able to mount the .dmg
using:
hdiutil attach /path/to/file.dmg
And then copy its contents (which appears in /Volumes
) where ever you like.