Courseiva
System Management →hardMultiple Choice

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?

⚠ Common exam trap

The trap here is conflating 'persistent' with 'immediately usable' — candidates forget that fstab alone does not mount the filesystem, and that mkfs must precede any mount attempt.

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

The correct sequence must (1) create the filesystem with mkfs, (2) mount it now so it is usable immediately, and (3) add an /etc/fstab entry so the mount persists across reboots. Option A does all three in the right order using mkfs -t ext4, mount, and an fstab line with dump=0 and fsck pass=2. The fsck pass value of 2 is appropriate for a non-root filesystem.

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

    mkfs -t ext4 creates the filesystem, mount attaches it at /mnt/data, and the /etc/fstab entry with dump 0 and pass 2 makes the mount persistent across reboots. The pass value 2 suits a non-root filesystem.

  • ✗

    mkfs.ext4 /dev/sdb1; echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab

    Why it's wrong here

    This creates the filesystem and writes the fstab entry, but never mounts it, so /mnt/data stays unmounted until reboot. The mount command is missing. This sequence suits preparing a filesystem for a later reboot, not immediate persistent use.

  • ✗

    mkfs.ext4 /dev/sdb1; mount /dev/sdb1 /mnt/data

    Why it's wrong here

    Mounting succeeds only for the current session; nothing is written to /etc/fstab, so the filesystem vanishes after reboot. It is tempting because mkfs.ext4 plus mount is the standard way to create and attach a filesystem temporarily, which is exactly right when persistence is not required.

  • ✗

    echo '/dev/sdb1 /mnt/data ext4 defaults 0 2' >> /etc/fstab; mount -a

    Why it's wrong here

    Writing the fstab entry before mkfs.ext4 leaves /dev/sdb1 without a filesystem, so mount -a fails and the persistent mount never materialises. It is tempting because fstab plus mount -a is the standard mechanism for persistent mounts, and would be correct once the filesystem already exists on the partition.

  • ✗

    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 partitions a disk; it does not create an ext4 filesystem, so mounting /dev/sdb1 fails without mkfs.ext4. The fstab entry alone cannot compensate. fdisk suits partitioning raw disks before filesystem creation, not formatting an existing partition.

About these practice questions

Courseiva writes every XK0-006 question from scratch — 781 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official CompTIA exam blueprint

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.