Encrypting and formatting disks on Linux
Steps to encrypt disks on Linux (tested here on Xubuntu 16.04)
Wipe the disk
dd if=/dev/zero of=/dev/<disk>Encrypt the disk
cryptsetup -y -v luksFormat /dev/<disk>Decrypt the disk to access it
cryptsetup luksOpen /dev/<disk> <name>the name can be anything you like. Format the disk
mkfs.ext4 /dev/mapper/<name>create a mount point
mkdir /media/<mount point>mount the disk
mount -t ext4 /dev/mapper/<name> /media/<mount point>To unmount and encrypt it again
umount /media/<mount point>
cryptsetup luksClose <name>