Sign up ×
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 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

3 Answers 3

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

You want to run diskutil coreStorage unlockVolume <UUID>, where the UUID is the Disk Identifier associated with your encrypted disk, /dev/disk3. You can get the identifier by running diskutil list in the terminal and looking for the output related to /dev/disk3. The identifier is a long string that would look something like this 'B807C2A0-577F-3DB0-9002-F82B9137696C'.

It will prompt you for a password at that point and if it's correct, unlock the disk.

share|improve this answer
THIS is the answer. Thank you!! – Qix Oct 2 at 11:49

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.