UP | HOME

Disk Encryption With LUKS

The following is a quick guide to encrypt a device using LUKS and access the encrypted data.

For more details, see FrequentlyAskedQuestions.

Setup device

wipefs -a <target device>
cryptsetup luksFormat <target device>
cryptsetup luksOpen <target device> c1
mkfs.ext4 /dev/mapper/c1
cryptsetup luksClose c1

Access data

cryptsetup luksOpen <target device> c1
mount /dev/mapper/c1 /mnt
# ...
umount /mnt
cryptsetup luksClose c1

Date: 2025-03-06 Thu 00:00

Author: Roi Martin

Created: 2025-03-18 Tue 09:59

Validate