mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-12 04:54:52 +03:00
20 lines
475 B
Markdown
20 lines
475 B
Markdown
# cryptsetup
|
|
|
|
> Manage plain dm-crypt and LUKS (Linux Unified Key Setup) encrypted volumes.
|
|
|
|
- Initialize a LUKS volume (overwrites all data on the partition):
|
|
|
|
`cryptsetup luksFormat {{/dev/sda1}}`
|
|
|
|
- Open a LUKS volume and create a decrypted mapping at /dev/mapper/{{target}}:
|
|
|
|
`cryptsetup luksOpen {{/dev/sda1}} {{target}}`
|
|
|
|
- Remove an existing mapping:
|
|
|
|
`cryptsetup luksClose {{target}}`
|
|
|
|
- Change the LUKS volume's passphrase:
|
|
|
|
`cryptsetup luksChangeKey {{/dev/sda1}}`
|