2016-06-17 14:16:02 +02:00
|
|
|
# cryptsetup
|
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
> Manage plain `dm-crypt` and LUKS (Linux Unified Key Setup) encrypted volumes.
|
|
|
|
> Some subcommands such as `luksFormat` have their own usage documentation.
|
|
|
|
> More information: <https://manned.org/cryptsetup>.
|
2016-06-17 14:16:02 +02:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
- Initialize a LUKS volume with a passphrase (overwrites all data on the partition):
|
2016-06-17 14:16:02 +02:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
`cryptsetup luksFormat {{/dev/sdXY}}`
|
2016-06-17 14:16:02 +02:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/mapping_name`:
|
2016-06-17 14:16:02 +02:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
`cryptsetup open {{/dev/sdXY}} {{mapping_name}}`
|
|
|
|
|
|
|
|
- Display information about a mapping:
|
|
|
|
|
|
|
|
`cryptsetup status {{mapping_name}}`
|
2016-07-14 16:27:07 +05:30
|
|
|
|
|
|
|
- Remove an existing mapping:
|
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
`cryptsetup close {{mapping_name}}`
|
2018-06-18 12:08:59 +00:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
- Change a LUKS volume's passphrase:
|
2018-06-18 12:08:59 +00:00
|
|
|
|
2024-10-16 09:23:22 +02:00
|
|
|
`cryptsetup luksChangeKey {{/dev/sdXY}}`
|