Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I type diskutil mount disk3 in the terminal, it says Volume(s) mounted successfully. However, the disk is not mounted and I can confirm this by opening the GUI of Disk Utility.app and also the disk does not show in the Finder.

I suspect this is because the disk is encrypted and the terminal command is not passing via "Keychain" to retrieve the password for the encrypted disk.

What do you think? Is there a way to mount encrypted disks via the command line?

share|improve this question

2 Answers 2

You can use hdiutil to mount a disk image that is protected with a passphrase.

hdiutil attach -agentpass /path/to/image.dmg

That should attempt to mount the disk image, prompting you for the passphrase. If it's encrypted with a public key, you can pass that using option -pubkey.

share|improve this answer
Thanks. This isn't quite what I"m looking for. It doesn't ask for the password the disk is encrypted with. It asks for my local account password twice before attaching the disk. –  josswinn Mar 4 '12 at 7:40
Oddly enough it only prompts me for a password when I omit the -agentpass option. –  Teo Sartori May 13 '13 at 9:17

I can't see what I'm doing differently today, but

diskutil unmount disk3


diskutil mount disk3

are working fine and properly unmounting and mounting the HDD and it is viewable in the Finder. Encryption doesn't seem to have anything to do with it.

share|improve this answer
Are you answering your own question here? If so, is your answer that the problem simply went away? –  Daniel Mar 6 '12 at 7:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.