nerdexam
Linux_Foundation

LFCS · Question #355

An administrator has created a mapping with the following command: cryptsetup luksOpen /dev/sda1 cryptvol and has set three different keys. Which command below will delete the first key?

The correct answer is A. cryptsetup luksDelKey /dev/sda1 0. To delete the first key from a LUKS device, use cryptsetup luksDelKey targeting the raw underlying device and specifying key slot 0.

Submitted by tarun92· Apr 18, 2026Storage Management

Question

An administrator has created a mapping with the following command: cryptsetup luksOpen /dev/sda1 cryptvol and has set three different keys. Which command below will delete the first key?

Options

  • Acryptsetup luksDelKey /dev/sda1 0
  • Bcryptsetup luksDelKey /dev/sda1 1
  • Ccryptsetup luksDelKey /dev/mapper/cryptvol 1
  • Dcryptsetup luksDelKey /dev/mapper/cryptvol 0

How the community answered

(46 responses)
  • A
    89% (41)
  • B
    4% (2)
  • C
    7% (3)

Why each option

To delete the first key from a LUKS device, use `cryptsetup luksDelKey` targeting the raw underlying device and specifying key slot `0`.

Acryptsetup luksDelKey /dev/sda1 0Correct

The `cryptsetup luksDelKey` command targets the underlying LUKS-encrypted physical device (e.g., `/dev/sda1`) where the LUKS header and key slots reside, and key slots are 0-indexed, so `0` refers to the first key slot.

Bcryptsetup luksDelKey /dev/sda1 1

Specifying `1` would delete the second key slot, not the first.

Ccryptsetup luksDelKey /dev/mapper/cryptvol 1

The `luksDelKey` operation is performed on the raw LUKS-encrypted device (`/dev/sda1`), not the active device mapper mapping (`/dev/mapper/cryptvol`), and `1` refers to the second key slot.

Dcryptsetup luksDelKey /dev/mapper/cryptvol 0

The `luksDelKey` operation is performed on the raw LUKS-encrypted device (`/dev/sda1`), not the active device mapper mapping (`/dev/mapper/cryptvol`).

Concept tested: `cryptsetup luksDelKey` usage and key slot indexing

Source: https://gitlab.com/cryptsetup/cryptsetup/-/wikis/DMCrypt

Topics

#cryptsetup#LUKS#Disk Encryption#Key Management

Community Discussion

No community discussion yet for this question.

Full LFCS Practice