Linux command
cryptsetup-luksformat 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
cryptsetup luksFormat [/dev/sdXY]
Example
cryptsetup luksFormat [/dev/sdXY] [path/to/keyfile]
Example
cryptsetup luksFormat --label [label] [/dev/sdXY]
说明
cryptsetup luksFormat initializes a LUKS (Linux Unified Key Setup) encrypted partition. It creates the LUKS header and sets up the initial key slot with either a passphrase or keyfile. LUKS provides standardized on-disk encryption with multiple key slots, secure key management, and compatibility across distributions.
参数
- --label _label_
- Set LUKS2 label
- --type _type_
- LUKS type (luks1, luks2)
- --cipher _cipher_
- Encryption cipher
- --key-size _bits_
- Key size in bits
- --hash _hash_
- Hash algorithm for PBKDF
- --iter-time _ms_
- PBKDF iteration time in milliseconds
FAQ
What is the cryptsetup-luksformat command used for?
cryptsetup luksFormat initializes a LUKS (Linux Unified Key Setup) encrypted partition. It creates the LUKS header and sets up the initial key slot with either a passphrase or keyfile. LUKS provides standardized on-disk encryption with multiple key slots, secure key management, and compatibility across distributions.
How do I run a basic cryptsetup-luksformat example?
Run `cryptsetup luksFormat [/dev/sdXY]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --label _label_ do in cryptsetup-luksformat?
Set LUKS2 label