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.


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:



If you have Mountain Lion or later, use fdesetup


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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