Create your LUKS-encrypted file containers
1 CREATE LUKS CONTAINER
Open Terminal and create a file of
random data with sudo dd if=/ dev/urandom of=test1 bs=1M
count=512 . This command creates a 512MB container. Modify ‘bs’ and ‘count’ to suit your needs. Change the name from ‘test1’ to something more meaningful if you wish, too. Next, add a LUKS header to the container with sudo cryptsetup -y luksFormat test1 . Type “YES” and enter your password twice.
2 MOUNT YOUR DEVICE
Open your new container with sudo cryptsetup luksOpen test1
vol1 . This opens your file as a local loopback device at /dev/mapper/vol1. Assign a file system to your device with sudo mkfs. ext4 -j /dev/mapper/vol1 . Next, create a mount point, such as sudo mkdir /mnt/secretfiles and mount the device with sudo mount /dev/ mapper/vol1 /mnt/secretfiles . Open your File Manager and go to your mount
3 COPY YOUR FILES
Copy your secret files to the LUKS container. At this stage, you may want to backup the LUKS volume header (see above). To close the container, run sudo umount /mnt/secretfiles , then sudo cryptsetup
luksClose vol1 . Amend the mount point and volume names as necessary. To reopen run sudo cryptsetup luksOpen test1 vol1 , then sudo mount /dev/mapper/vol1 /mnt/secretfiles