diff --git a/pages/linux/cryptsetup.md b/pages/linux/cryptsetup.md index 0142633f8..65cbd8d8d 100644 --- a/pages/linux/cryptsetup.md +++ b/pages/linux/cryptsetup.md @@ -1,11 +1,15 @@ # cryptsetup -> Manage plain dm-crypt and LUKS encrypted volumes. +> Manage plain dm-crypt and LUKS(Linux Unified Key Setup) encrypted volumes. -- Format a drive (or a file) to make it a LUKS volume: +- Initialize a LUKS volume (overwrites all data on the partition): -`cryptsetup luksFormat {{path/to/luks_volume_to_be}}` +`cryptsetup luksFormat {{/dev/sda1}}` -- Open a volume so that you can access it decrypted on the fly at /dev/mapper/{{a}}: +- Open a LUKS volume and create a decrypted mapping at /dev/mapper/{{target}}: -`cryptsetup luksOpen {{path/to/luks_volume_to_be}} {{a}}` +`cryptsetup luksOpen {{/dev/sda1}} {{target}}` + +- Remove an existing mapping: + +`cryptsetup luksClose {{target}}`