Easy access to TrueCrypt from the command-line in OS X

TrueCrypt on Mac OS X has a nice GUI, but if you’re a command-line afficionado…

Put this in your ~/.bashrc or similar file:

alias truecrypt='/Applications/TrueCrypt.app/Contents/MacOS/Truecrypt --text'

Then you can do stuff like:

$ truecrypt
Usage: Truecrypt [--auto-mount <str>] [--backup-headers] [--background-task] [-C] [-c] [--create-keyfile] [--delete-token-keyfiles] [-d] [--display-password] 
[--encryption <str>] [--explore] [--export-token-keyfile] [--filesystem <] [-f] [--hash <str>] [-h] [--import-token-keyfiles] 
[-k <str>] [-l] [--list-token-keyfiles] [--load-preferences] [--mount] [-m <str>] [--new-keyfiles <str>] 
[--new-password <str>] [--non-interactive] [-p <str>] [--protect-hidden <str>] [--protection-keyfiles <str>] 
[--protection-password <str>] [--random-source <str>] [--restore-headers] [--save-preferences] [--quick] [--size <str>] 
[--slot <str>] [--test] [-t] [--token-lib <str>] [-v] [--version] [--volume-properties] [--volume-type <str>] [Volume path] [Mount point]
...

or:

$ truecrypt --text --non-interactive --password=(password) --mount /Users/marc/Dropbox/TrueCryptVolume.truecrypt /Volumes/TrueCrypt

marc@hyperion:~
12:31:43 $ ls /Volumes/TrueCrypt
Audio/     Backups/   Documents/ Taxes/

or:

$ truecrypt --list
1: /Users/marc/Dropbox/TrueCryptVolume.truecrypt /dev/disk4 /Volumes/TrueCrypt

or:

$ truecrypt --dismount
$ truecrypt --list
Error: No volumes mounted.

4 thoughts on “Easy access to TrueCrypt from the command-line in OS X

  1. Awesome, thanks so much for this, the official docs on the Mac version of Truecrypt are rather lacking, so this very much filled a void.

  2. thank you this was very helpful. the truecrypt docs seem to skip over this crucial step.

Leave a Reply

Your email address will not be published. Required fields are marked *