Courseiva
Create and configure file systemseasyMultiple ChoiceObjective-mapped

EX200 Create and configure file systems Practice Question

An administrator needs to add a 1GB swap partition on /dev/sdd1. Which series of commands accomplishes this?

⚠ Common exam trap

Red Hat often tests the requirement to create the partition first before formatting it as swap, leading candidates to mistakenly choose options that assume the partition already exists or skip the fstab entry for persistence.

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

fdisk /dev/sdd, create partition, then mkswap /dev/sdd1, swapon /dev/sdd1, and add to /etc/fstab.

It includes all necessary steps: first create the partition with fdisk (since /dev/sdd1 does not exist yet), then format it as swap with mkswap, activate it with swapon, and finally add an entry to /etc/fstab to ensure persistence across reboots. The other options omit the critical partition creation step or fail to make the swap permanent.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • mkswap /dev/sdd1 && echo '/dev/sdd1 swap swap defaults 0 0' >> /etc/fstab

    Why it's wrong here

    This command initializes the swap area correctly with mkswap and writes an /etc/fstab entry so the swap will persist across reboots, but it never executes swapon to activate the swap immediately. Without running swapon (or rebooting), the system continues to run with no active swap space, so the administrator's request to 'add' swap is not fulfilled at runtime. The fstab entry is necessary for persistence, but activation must happen first in the current session.

  • mkfs.swap /dev/sdd1 && swapon /dev/sdd1

    Why it's wrong here

    The command mkfs.swap is not a valid utility; the correct command-line tool for creating a swap signature on a partition is mkswap. Even if the intent were to use mkfs.swap as a synonym, the command would fail with 'command not found', and the subsequent swapon would never run because of the && short-circuit operator. Additionally, even a successful mkswap + swapon sequence would still lack an /etc/fstab entry, meaning the swap would not be available after a reboot.

  • mkswap /dev/sdd1 && swapon /dev/sdd1

    Why it's wrong here

    This command correctly initializes the partition with mkswap and activates it with swapon, so swap becomes available immediately. However, it does not add an entry to /etc/fstab, so the swap space will not be automatically activated when the system reboots; the administrator would need to manually run swapon after every boot. It also assumes that /dev/sdd1 already exists as a partition, but the question requires creating a 1 GB swap partition, so partition creation (e.g., with fdisk) is a missing prerequisite.

  • fdisk /dev/sdd, create partition, then mkswap /dev/sdd1, swapon /dev/sdd1, and add to /etc/fstab.

    Why this is correct

    This is the complete and correct procedure: fdisk creates a 1 GB partition on /dev/sdd (assigned as /dev/sdd1), mkswap writes the swap signature to that partition, swapon activates the swap for immediate use, and adding the line to /etc/fstab ensures automatic activation at boot. The fstab entry alone or the swapon alone would be incomplete, but combining them covers both current-session and persistent swap. The fdisk step also ensures the partition actually exists with the desired size, unlike the other options that assume a preexisting /dev/sdd1.

About these practice questions

This EX200 question is part of Courseiva's 127-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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.