luks process

En root

apt install cryptsetup

Copy your home directory to a temporary directory on a different partition:

mkdir /homebackup
cp -a /home/* /homebackup

Encrypt your home partition:

umount /home
cryptsetup -h sha512 -c aes-xts-plain64 -s 512 luksFormat /dev/sda5
cryptsetup luksOpen /dev/sda5 chome
mkfs.ext4 -m 0 /dev/mapper/chome

Add this line to /etc/crypttab:

chome    /dev/sda5    none    luks,timeout=30

Set the home partition to this in /etc/fstab (replacing the original home partition line):

/dev/mapper/chome /home ext4 nodev,nosuid,noatime 0 2

Copy your home data back into the encrypted partition:

mount /home
cp -a /homebackup/* /home
rm -rf /homebackup