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.
|
2021-07-09 15:45:55 +01:00
|
|
|
> More information: <https://gitlab.com/cryptsetup/cryptsetup/>.
|
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
|
|
|
|
2023-11-12 03:08:58 +00: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}}`
|