Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm interested in knowing whether there are any native utilities (possibly under diskutil) to encrypt a disk via the command line in OS X 10.8.4. I can use FileVault or Mac OS's Disk Utility Erase tab, but am just curious whether there is a command-line alternative.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

If you have Mountain Lion or later, use fdesetup

examples

share|improve this answer

You can use the following command to encrypt from the command line:

diskutil cs convert /Volumes/your_drive_name_here -passphrase

You should get output similar to this:

computer name:~ username$ diskutil cs convert /Volumes/your_drive_name_here -passphrase
New passphrase for converted volume:
Confirm new passphrase:
Started CoreStorage operation on disk2s1 your_drive_name_here
Resizing disk to fit Core Storage headers
[ - 0%..10%.............................................. ]
Creating Core Storage Logical Volume Group
Attempting to unmount disk2s1
Switching disk2s1 to Core Storage
Waiting for Logical Volume to appear
Mounting Logical Volume
Core Storage LVG UUID: D1EAB2C3-EC21-41DA-AD60-75E1302E247B
Core Storage PV UUID: 991C89E9-A628-408C-AAFF-39A561FCB95C
Core Storage LV UUID: 36483526-6C2C-43FA-A4B7-6F503473F1C2
Core Storage disk: disk3
Finished CoreStorage operation on disk2s1 your_drive_name_here
Encryption in progress; use `diskutil coreStorage list` for status

I have a post here with more details:

http://derflounder.wordpress.com/2012/01/06/encrypting-10-7-non-boot-volumes-without-erasing-them/

share|improve this answer

Your Answer

 
discard

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.