tldr/pages/linux/cryptsetup.md

21 lines
542 B
Markdown
Raw Permalink Normal View History

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.
> More information: <https://gitlab.com/cryptsetup/cryptsetup/>.
2016-06-17 13:16:02 +01:00
- Initialize a LUKS volume (overwrites all data on the partition):
2016-06-17 13:16:02 +01:00
`cryptsetup luksFormat {{/dev/sda1}}`
2016-06-17 13:16:02 +01:00
- Open a LUKS volume and create a decrypted mapping at `/dev/mapper/{{target}}`:
2016-06-17 13:16:02 +01:00
`cryptsetup luksOpen {{/dev/sda1}} {{target}}`
- Remove an existing mapping:
`cryptsetup luksClose {{target}}`
- Change the LUKS volume's passphrase:
`cryptsetup luksChangeKey {{/dev/sda1}}`