This is based on Debian Linux but should apply equally to any *nix distro.
apt-get install cryptsetup
Of course change /dev/md2 with whatever partition you intend to use LUKS on.
cryptsetup --verbose --verify-passphrase luksFormat /dev/md2
You'll be asked to verify your decryption password twice
*DO NOT FORGET THIS PASSWORD AS IT IS NOT RECOVERABLE!
cryptsetup luksOpen /dev/md2 mylukspartition
You'll be asked for your passphrase at this point (the one you entered above, hopefully you haven't forgotten it already!)
You can change "mylukspartition" to whatever you would like to call it, it just controls the name created in /dev/mapper which is the device you will use to mount the encrypted LUKS partition.
You'll find that the above command creates
This will create the device for your LUKS partition (remember you will never be able to open it directly and you'll always need the LUKS tools to unlock the partition, so keep this in mind when using a Live/Recovery CD etc...)
*Of course you can use any filesystem over top of LUKS but most will probably use ext3
mount /dev/mapper/mylukspartition /mnt/luks
cryptsetup luksClose /dev/mapper/mylukspartition
Now your data is safe and in order to mount (luksOpen) you will need the passphrase which only you should know.
luks, cryptsetup, tutorial, linux, partition, encryptionthis, debian, equally, nix, distro, install, crypt, apt, dev, md, verbose, verify, passphrase, luksformat, ll, decryption, password, recoverable, unlock, luksopen, mylukspartition, haven, quot, controls, mapper, mount, encrypted, creates, etc, filesystem, mkfs, ext, mkdir, mnt, umount, luksclose,