Where is a dmg file mounted?
All volumes, including DMGs, are mounted in /Volumes.

You can get a list of mounted volumes by typing ls /Volumes in Terminal.

You can navigate to a Disk Image using cd /Volumes/nameOfImage.