cryptsetup

LUKS disk encryption

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
cryptsetup luksHeaderBackup <dev> --header-backup-file hdr.imgBack up the header
cryptsetup luksDump <dev>Review key slots
What it does

Sets up, opens and manages LUKS encrypted volumes.

Common flags
FlagMeaning
luksFormatEncrypt a device (erases data)⚠ Destroys existing data.
openUnlock a volume
closeLock a volume
luksHeaderBackupBack up the LUKS header
luksRemoveKeyRemove a passphrase
Examples
cryptsetup open /dev/sdb1 secureUnlock · explain & risk-check →
cryptsetup luksHeaderBackup /dev/sdb1 --header-backup-file hdr.imgBack up the header · explain & risk-check →
Related
lsblk mkfs
Open the full explainer →More in Disks & Filesystems

Reference text is hand-written and may be incomplete — check man cryptsetup for your version. Test destructive commands on a non-production system first.