LFCS Storage Management Practice Question
An administrator needs to encrypt a block device (/dev/sdc) using LUKS. Which command creates an encrypted LUKS container on the device?
⚠ Common exam trap
Watch out — candidates often confuse `luksFormat` (which creates the container) with `luksOpen` (which opens/maps it), or they think a generic encryption tool like `openssl enc` can replace LUKS for block device encryption.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
cryptsetup luksFormat /dev/sdc
`cryptsetup luksFormat /dev/sdc` initializes the block device with a LUKS header, setting up an encrypted container that can later be opened with a passphrase or key file. This is the standard command for creating a new LUKS partition, as it writes the LUKS metadata and prepares the device for encryption.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
cryptsetup luksOpen /dev/sdc encrypted_device
Why it's wrong here
luksOpen opens an existing LUKS container and maps it to a device-mapper name; it fails on an unformatted device because no LUKS header exists yet. It is tempting as it is the usual next step, but the container must first be created with cryptsetup luksFormat.
- ✓
cryptsetup luksFormat /dev/sdc
Why this is correct
cryptsetup luksFormat initialises a LUKS header on the block device, establishing the encrypted container and prompting for the passphrase. This is the required first step before luksOpen maps it, satisfying the encryption requirement for /dev/sdc.
- ✗
openssl enc -aes-256-cbc -in /dev/sdc -out /dev/sdc.enc
Why it's wrong here
openssl enc performs file-level symmetric encryption, producing an encrypted copy rather than formatting the block device with a LUKS header. It is tempting because it uses AES-256, but LUKS requires cryptsetup luksFormat to write the header and map the device through dm-crypt.
- ✗
dm-crypt create encrypted /dev/sdc
Why it's wrong here
dm-crypt is a kernel subsystem configured through cryptsetup or dmsetup, not a standalone command with a create subcommand. It is tempting because dm-crypt underlies LUKS, but the required tool is cryptsetup luksFormat, which writes the LUKS header onto /dev/sdc.
Go deeper
Related to this question
About these practice questions
One of 406 original LFCS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.