Encrypting a Drive with LUKS and cryptsetup

1. Get the drive name

lsblk

2. Install cryptsetup

sudo pacman -S cryptsetup

3. Format the drive

cfdisk /dev/sdaX
mkfs.ext4 /dev/sdaX

4. Encrypt the created partition

lsblk /dev/sdaX
cryptsetup luksFormat /dev/sda[0-9]

5. Decrypt and create filesystem

cryptsetup open /dev/sda[0-9] <name>
mkfs.ext4 /dev/mapper/<name>

6. Re-encrypt after usage

cryptsetup close <name>