Skip to content

Instantly share code, notes, and snippets.

@da-n
Created August 25, 2019 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save da-n/157b915152b8829440a8e1e8c49551e9 to your computer and use it in GitHub Desktop.
Save da-n/157b915152b8829440a8e1e8c49551e9 to your computer and use it in GitHub Desktop.
Create a LUKS encrypted volume

Create a LUKS encrypted volume

sudo cryptsetup --verbose --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda1
sudo cryptsetup open --type luks /dev/sda1 backup
sudo mkfs.ext4 /dev/mapper/backup
sudo mount -t ext4 /dev/mapper/backup /mnt/backup
sudo umount /mnt/backup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment