Files
tldr/pages.zh/linux/cryptsetup.md
2024-11-06 20:25:04 +01:00

21 lines
494 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# cryptsetup
> 管理普通 dm-crypt 和 LUKSLinux 统一密钥设置)加密卷。
> 更多信息:<https://manned.org/cryptsetup>.
- 初始化 LUKS 卷(覆盖分区上的所有数据):
`cryptsetup luksFormat {{/dev/sda1}}`
- 打开 LUKS 卷并在 `/dev/mapper/目标` 创建解密映射:
`cryptsetup luksOpen {{/dev/sda1}} {{目标}}`
- 删除已存在的映射:
`cryptsetup luksClose {{目标}}`
- 更改 LUKS 卷的口令:
`cryptsetup luksChangeKey {{/dev/sda1}}`