Disk Encryption With LUKS
The following is a quick guide to encrypt a device using LUKS and access the encrypted data.
For more details, see FrequentlyAskedQuestions.
Setup device
wipefs -a <target device>
cryptsetup luksFormat <target device>
cryptsetup luksOpen <target device> c1
mkfs.ext4 /dev/mapper/c1
cryptsetup luksClose c1
Access data
cryptsetup luksOpen <target device> c1
mount /dev/mapper/c1 /mnt
# ...
umount /mnt
cryptsetup luksClose c1