2016-06-17 13:16:02 +01:00
|
|
|
# cryptsetup
|
|
|
|
|
2016-07-14 11:57:44 +01:00
|
|
|
> Manage plain dm-crypt and LUKS (Linux Unified Key Setup) encrypted volumes.
|
2016-06-17 13:16:02 +01:00
|
|
|
|
2016-07-14 11:57:07 +01:00
|
|
|
- Initialize a LUKS volume (overwrites all data on the partition):
|
2016-06-17 13:16:02 +01:00
|
|
|
|
2016-07-14 11:57:07 +01:00
|
|
|
`cryptsetup luksFormat {{/dev/sda1}}`
|
2016-06-17 13:16:02 +01:00
|
|
|
|
2016-07-14 11:57:07 +01:00
|
|
|
- Open a LUKS volume and create a decrypted mapping at /dev/mapper/{{target}}:
|
2016-06-17 13:16:02 +01:00
|
|
|
|
2016-07-14 11:57:07 +01:00
|
|
|
`cryptsetup luksOpen {{/dev/sda1}} {{target}}`
|
|
|
|
|
|
|
|
- Remove an existing mapping:
|
|
|
|
|
|
|
|
`cryptsetup luksClose {{target}}`
|
2018-06-18 13:08:59 +01:00
|
|
|
|
|
|
|
- Change the LUKS volume's passphrase:
|
|
|
|
|
|
|
|
`cryptsetup luksChangeKey {{/dev/sda1}}`
|