Mounting Encrypted Drives | Ben Cunningham

Mounting Encrypted Drives

Written by Ben Cunningham · on July 30, 2018

I can never remember how to mount a drive, let alone a LUKS-encrypted one. Here’s how I do it on my Raspberry Pi with an external drive named Domino, based on this Stack Exchange post. You can use df -h if you don’t know the drive number.

Decrypt & Open

sudo mkdir /media/pi/Domino

sudo cryptsetup luksOpen /dev/sda1 Domino
sudo mount /dev/mapper/Domino /media/pi/Domino

Close & Encrypt

sudo umount /media/pi/Domino
sudo cryptsetup luksClose Domino