LPIC-1 Devices, Filesystems and FHS Practice Question
Which TWO commands can be used to create an ext4 filesystem on a partition?
⚠ Common exam trap
It's easy for candidates to think only `mkfs.ext4` is valid, overlooking that `mke2fs -t ext4` is an equivalent command, or they may confuse filesystem-specific mkfs wrappers (like `mkfs.btrfs` or `mkfs.xfs`) as being able to create ext4 filesystems.
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
Option B, mkfs.ext4 /dev/sdb1, is correct because mkfs.ext4 is the dedicated front-end utility for creating an ext4 filesystem on the specified block device, invoking the ext4 filesystem code directly. Option C, mke2fs -t ext4 /dev/sdb1, is also correct because mke2fs is the underlying ext-family filesystem creation tool, and the -t ext4 flag explicitly selects the ext4 filesystem type, producing the same ext4 result. The unmarked options do not belong: mkfs.btrfs creates a Btrfs filesystem, mkfs.msdos creates a FAT filesystem, and mkfs.xfs creates an XFS filesystem, none of which are ext4.
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.btrfs /dev/sdb1
Why it's wrong here
mkfs.btrfs creates a Btrfs filesystem, not ext4, so it cannot satisfy the requirement. It is tempting because mkfs.btrfs is the correct tool when Btrfs features such as snapshots, subvolumes or checksumming are wanted, but the stem explicitly asks for ext4, which requires mkfs.ext4 or mke2fs -t ext4.
- ✓
mkfs.ext4 /dev/sdb1
Why this is correct
mkfs.ext4 is the ext4-specific front end that invokes mke2fs with the correct type, creating the filesystem directly on the named partition. It satisfies the requirement to build an ext4 filesystem on /dev/sdb1 without extra flags.
- ✓
mke2fs -t ext4 /dev/sdb1
Why this is correct
The `-t ext4` flag instructs `mke2fs` to build an ext4 filesystem directly, satisfying the requirement to create ext4 on the partition. Since `mke2fs` is the underlying tool that `mkfs.ext4` invokes, specifying the type explicitly produces identical on-disk structures without needing a separate wrapper command.
- ✗
mkfs.msdos /dev/sdb1
Why it's wrong here
mkfs.msdos writes FAT filesystems, so it cannot create ext4 regardless of the target partition. It is tempting because mkfs front-ends share identical syntax, and mkfs.msdos is the right tool when a partition must be readable by Windows or embedded devices requiring FAT16/FAT32.
- ✗
mkfs.xfs /dev/sdb1
Why it's wrong here
mkfs.xfs writes an XFS filesystem, so it cannot create ext4 regardless of the target partition. It is tempting because mkfs.xfs is the correct tool when the requirement is an XFS filesystem, for example on RHEL default installations, but here the stem specifies ext4, which mkfs.xfs never produces.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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.