XK0-006 System Management Practice Question
A technician needs to create a new ext4 filesystem on /dev/sdb1 and mount it persistently at /mnt/data. Which set of commands accomplishes this?
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 -t ext4 /dev/sdb1; mount /dev/sdb1 /mnt/data; echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab
Only option A correctly creates the filesystem, mounts it immediately, and adds the entry to /etc/fstab for persistent mounting. Option B creates the filesystem and adds the fstab entry, but does not mount the filesystem, so it does not accomplish the task of having the filesystem mounted immediately.
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; mount /dev/sdb1 /mnt/data; echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab
Why this is correct
This sequence creates the filesystem, mounts it, and adds to fstab, so it is correct.
- ✗
mkfs.ext4 /dev/sdb1; echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab
Why it's wrong here
Creates the ext4 filesystem and adds a persistent mount entry to /etc/fstab, but fails to mount the filesystem immediately.
- ✗
mkfs.ext4 /dev/sdb1; mount /dev/sdb1 /mnt/data
Why it's wrong here
Missing fstab entry; mount will not persist after reboot.
- ✗
echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab; mount -a
Why it's wrong here
Missing mkfs; filesystem doesn't exist on /dev/sdb1.
- ✗
fdisk /dev/sdb1; mount /dev/sdb1 /mnt/data; echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab
Why it's wrong here
fdisk is for partitioning, not creating filesystem; mkfs is needed.
Go deeper
Related to this question
Learn chapter
Navigating the Filesystem
Key term
ext4
ext4 is the default file system for many Linux distributions, designed to store and manage files on a hard drive or SSD with journaling, large volume support, and backward compatibility.
Key term
Mount
Mounting is the process of making a file system or storage device accessible to a computer's operating system by attaching it to a specific directory in the existing directory tree.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.