LPIC-1 Devices, Filesystems and FHS Practice Question
Which TWO of the following commands can be used to create a new filesystem on a partition?
⚠ Common exam trap
Many exam-takers confuse partition management tools (fdisk, parted) with filesystem creation tools (mkfs), or mistakenly think fsck can create a filesystem because it interacts with filesystem metadata.
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
Option B, mkfs.ext4, is correct because it is a front-end to the mkfs family that specifically writes an ext4 filesystem onto a block device or partition, e.g. mkfs.ext4 /dev/sdb1. Option E, mkfs, is correct because it is the generic filesystem-creation utility that, when invoked with a type such as mkfs -t xfs /dev/sdb1, builds a new filesystem on the target partition. The unmarked options do not belong: fdisk (A) and parted (C) are partitioning tools that create/modify partition tables and partitions, not filesystems, and fsck (D) is a consistency-checking and repair utility for existing filesystems, not a creator.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
fdisk
Why it's wrong here
fdisk partitions block devices by writing partition tables; it never writes filesystem metadata, so mkfs remains necessary afterwards. It is tempting because partitioning is the usual precursor step, and fdisk would be the right tool when creating or resizing partitions before any filesystem exists.
- ✓
mkfs.ext4
Why this is correct
mkfs.ext4 is a filesystem-specific front end that builds an ext4 filesystem directly on a block device, writing superblocks, inode tables and journal structures. It satisfies the stem's requirement to create a new filesystem on a partition.
- ✗
parted
Why it's wrong here
parted partitions disks and can set a partition's type, but it does not write a filesystem; mkfs and mke2fs do. It is tempting because partitioning is the step immediately preceding filesystem creation, and parted would be correct if the task were creating or resizing the partition itself.
- ✗
fsck
Why it's wrong here
fsck checks and repairs existing filesystem structures; it cannot lay down new superblocks, inodes or journals on a blank partition. It is tempting because it operates on filesystems, and would be correct when an existing filesystem has corruption needing repair rather than creation.
- ✓
mkfs
Why this is correct
mkfs is the generic front end that dispatches to a type-specific builder, either via the -t option or by invoking mkfs.<type>. It satisfies the stem's requirement to create a new filesystem on a partition, defaulting to ext2 when no type is given.
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.