CompTIA Linux+ (XK0-006) · Domain 1 · 23% of exam

System Management

Drill 20 practice questions focused entirely on System Management for the CompTIA XK0-006 exam. Tap an answer for instant feedback and a full explanation — no sign-up, always free.

Verified answer20 questions
Question 1 of 20

You need to add a new vendor package repository to a RHEL 9 server so that packages from it are permanently available to dnf. The vendor provides a repository at https://repo.vendor.example/rhel9/. Which command adds this repository persistently to the system's dnf configuration?

Reviewed for accuracy · Report an issue
Question 2 of 20

A database administrator runs a legacy application that only works with a specific version of the 'libmariadb3' package on a Debian-based server. During routine 'apt upgrade' operations, the package keeps getting updated, breaking the application. Which command should be used to prevent this specific package from being upgraded while allowing all other packages to update normally?

Reviewed for accuracy · Report an issue
Question 3 of 20

After a routine kernel update on a RHEL 9 server, the system boots into the new kernel but a critical proprietary storage driver fails to load. As a temporary measure, you need the server to boot the previous (working) kernel by default on every reboot until the vendor releases a fix. Which action accomplishes this persistently?

Reviewed for accuracy · Report an issue
Question 4 of 20

A system administrator is about to run a large package upgrade on a server whose root filesystem is Btrfs. Before proceeding, they want the ability to instantly roll back the root subvolume to its current state if the upgrade breaks the system. Which command creates a point-in-time snapshot of the current root subvolume that can later be used for rollback?

Reviewed for accuracy · Report an issue
Question 5 of 20

A server was previously configured to boot into a graphical desktop, but after installing a headless monitoring role you want it to boot into a text-based multi-user environment by default. Which command correctly sets this as the persistent default boot target on a systemd-based system?

Reviewed for accuracy · Report an issue
Question 6 of 20

You added a new partition /dev/sdb1 to a database server and need to incorporate it into an existing volume group named 'vg_data' so you can later extend logical volumes. Before the partition can be added to the volume group, which command must you run first?

Reviewed for accuracy · Report an issue
Question 7 of 20

A systems administrator has a Btrfs filesystem mounted at /mnt/data (device /dev/sdb1). They want to isolate application logs into a dedicated Btrfs subvolume named 'logs' so it can later receive independent snapshots, and then mount that subvolume at /var/applog. Which sequence of commands accomplishes this correctly?

Reviewed for accuracy · Report an issue
Question 8 of 20

A database server has a volume group named 'vg_data' with 200 GB of free extents. You need to provision a new 50 GB logical volume called 'lv_backups' that you will format and mount later. Which command creates this logical volume from the existing volume group?

Reviewed for accuracy · Report an issue
Question 9 of 20

You added a new disk (/dev/sdb) to a database server and created a single ext4 partition at /dev/sdb1. The team wants the filesystem to mount automatically at /data on every boot, and they warn that device names may shift if disks are added later. After running mkfs.ext4 /dev/sdb1 and creating /data, which approach ensures a reliable persistent mount?

Reviewed for accuracy · Report an issue
Question 10 of 20

A server running low on memory needs additional swap space, but all disk partitions are already allocated and cannot be repartitioned. As the administrator, you decide to add a 2 GB swap file at /swapfile that will be active immediately and remain enabled after reboot. Which sequence of commands correctly accomplishes this?

Reviewed for accuracy · Report an issue
Question 11 of 20

A system administrator wants to migrate a nightly backup script from a cron job to a systemd timer. They have already created /etc/systemd/system/backup.service (a oneshot unit that runs the script) and /etc/systemd/system/backup.timer with an appropriate OnCalendar= directive. After reloading the systemd daemon, which command will activate the timer so it triggers on schedule AND persists across reboots?

Reviewed for accuracy · Report an issue
Question 12 of 20

A shared development server has an ext4 filesystem mounted at /home. Users are consuming excessive space, so you need to enforce a hard limit of 5 GB per user. You have already remounted /home with the usrquota option and run quotacheck. Which command sets a hard limit of 5 GB for the user 'jdoe'?

Reviewed for accuracy · Report an issue
Question 13 of 20

After a routine 'dnf update' on a RHEL 9 server, a critical in-house application stops responding. You determine that an updated version of the 'libwidget' package introduced the regression, and several dependent packages were updated in the same transaction. You need to revert the server to its exact state before that update while preserving package dependency consistency. Which command should you run?

Reviewed for accuracy · Report an issue
Question 14 of 20

A developer manually installed a .deb package on an Ubuntu server using 'dpkg -i app.deb'. The command completed but reported unmet dependencies, and the package is now in a half-configured state. Which command should you run to download and install the missing dependencies and complete the configuration?

Reviewed for accuracy · Report an issue
Question 15 of 20

A database server is running low on space in the /var/lib/pgsql directory, which is mounted on an XFS filesystem residing on the logical volume /dev/vg_data/lv_pgsql. You have already extended the logical volume by 20 GB using lvextend. The filesystem still reports the old size. Which command should you run to make the additional space usable without unmounting the filesystem?

Reviewed for accuracy · Report an issue
Question 16 of 20

A database server is running low on space in its volume group 'vg_data'. You have installed a new 500 GB disk that the kernel detects as /dev/sdc. After partitioning is not required (you intend to use the whole disk), which sequence correctly adds this capacity to the existing volume group so a logical volume can later be extended?

Reviewed for accuracy · Report an issue
Question 17 of 20

A developer on a shared workstation wants to install the GIMP Flatpak from Flathub, but they lack sudo privileges and administrators refuse to grant it. They want the application available only to their own account without affecting other users. Which command accomplishes this?

Reviewed for accuracy · Report an issue
Question 18 of 20

You added a third-party YUM repository to a RHEL 9 server by creating /etc/yum.repos.d/vendor.repo. When you run 'dnf install vendorapp', the transaction aborts with an error indicating the package is not signed by a trusted key or that GPG signature verification failed. The vendor's documentation confirms the package is legitimately signed with their public key, which is published at https://vendor.example/RPM-GPG-KEY. What is the correct way to resolve this so the package installs and future updates remain verified?

Reviewed for accuracy · Report an issue
Question 19 of 20

A web application fails to start on a RHEL 9 server, logging 'Address already in use' on TCP port 8080. Before restarting the systemd service, you need to identify which process is currently bound to that port. Which command will most directly reveal the PID and process name listening on port 8080?

Reviewed for accuracy · Report an issue
Question 20 of 20

You need to run a one-off data-processing command on a busy server, but it must be limited to 512 MB of memory and killed cleanly if it exceeds that limit. You do not want to create a permanent systemd unit file. Which command starts the process in a transient scope with the memory limit enforced by systemd?

Reviewed for accuracy · Report an issue

More XK0-006 practice

Keep going with the other CompTIA Linux+ (XK0-006) domains, or take a full timed mock exam.

← Back to XK0-006 overview