Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 1 down vote accepted

If you have Mountain Lion or later, use fdesetup


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:

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .