Skip to content

Cryptsetup

Install

Arch

sudo pacman -S cryptosetup

Crypt volume

sudo cryptsetup luksFormat /dev/sdaX

sudo cryptsetup open /dev/sda2 x

sudo mkfs.ext4 /dev/mapper/x

Open encrypted volume

sudo cryptsetup open /dev/sda2 x
# Enter passphrase for /dev/sda2:
sudo mkdir /mnt/x
sudo mount /dev/mapper/x /mnt/x

Unmount volume

sudo umount /dev/mapper/x
sudo cryptsetup close x