cryptsetup-status - Linux
Overview
cryptsetup-status displays the status of a Linux Unified Key Setup (LUKS) encrypted device. It provides detailed information about encryption mappings, keyslots, and the overall state of the device.
Syntax
cryptsetup-status [options] <device>
Options/Flags
-v
: Verbose Output – Displays additional details and status information.-q
: Quiet Output – Only prints errors and critical messages.-c
: Check Header – Checks the device header for consistency and validity.-h
: Print Help – Outputs the command usage syntax.-s
: Show Key Slots – Lists the available keyslots and their status.-e
: Exclude Headers – Skips displaying header information.-l
: Lock Status – Shows the lock status of the device, such as active, suspended, or unlocked.-p
: Password – Prompts for the device passphrase or key.
Examples
1. Display Status Information:
cryptsetup-status /dev/sda2
2. Show Keyslots:
cryptsetup-status -s /dev/sda2
3. Check Device Header:
cryptsetup-status -c /dev/sda2
Common Issues
- Invalid Passphrase: If the provided passphrase is incorrect, cryptsetup-status will fail with an error. Double-check the passphrase or use the
-p
option to provide it interactively. - Device Not Found: Ensure that the specified device path is correct and that the device is properly connected and accessible.
Integration
cryptsetup-status can be combined with other commands to manage encrypted devices:
- Encrypt a Device:
cryptsetup luksFormat /dev/sda2
- Open a Device:
cryptsetup open /dev/sda2 my_decrypted_device
- Close a Device:
cryptsetup close my_decrypted_device