LPIC-1 Devices, Filesystems and FHS Practice Question
Which command creates an ext4 filesystem on /dev/sdb1 without interactive prompts?
⚠ Common exam trap
Candidates often confuse `mkfs -t ext4` (which may prompt interactively) with `mkfs.ext4` (which is designed for non-interactive use), or they mistakenly think `mkfs.ext2` can create an ext4 filesystem due to the similar naming convention.
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
✓
mkfs.ext4 /dev/sdb1
`mkfs.ext4` is a direct frontend to `mke2fs` that creates an ext4 filesystem without interactive prompts. It automatically formats the partition with ext4 defaults, requiring no user confirmation, making it suitable for scripting.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
mkfs -t ext4 /dev/sdb1
Why it's wrong here
Incorrect: This command would work but is not the most direct; mkfs.ext4 is the standard command.
- ✗
mke2fs -t ext4 /dev/sdb1
Why it's wrong here
Incorrect: This also works but is not the standard command; mkfs.ext4 is preferred.
- ✗
mkfs.ext2 /dev/sdb1
Why it's wrong here
Incorrect: mkfs.ext2 creates an ext2 filesystem, not ext4.
- ✓
mkfs.ext4 /dev/sdb1
Why this is correct
Correct: mkfs.ext4 creates an ext4 filesystem non-interactively.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.