CompTIA Linux+ (XK0-006) — All Questions

← Back to practice

5 questions

System Management

Which directory in the Filesystem Hierarchy Standard is intended to hold variable data such as logs, spool files, and caches?

  • a./etc
  • b./var
  • c./opt
  • d./usr

/var stores variable data that changes during normal operation, including /var/log, /var/spool, and /var/cache. /etc holds system configuration, /usr holds read-only user programs and libraries, and /opt holds optional add-on software packages.

System Management

On a Debian/Ubuntu system, which command updates the local package index without installing or upgrading any packages?

  • a.apt upgrade
  • b.dpkg --configure -a
  • c.apt update
  • d.apt full-upgrade

'apt update' refreshes the local package index from the configured repositories so the system knows about the latest available versions. 'apt upgrade' and 'apt full-upgrade' actually install newer packages, and 'dpkg --configure -a' finishes configuring partially installed packages.

System Management

Which systemctl command shows whether a service is set to start automatically at boot?

  • a.systemctl is-enabled sshd
  • b.systemctl status sshd --now
  • c.systemctl is-active sshd
  • d.systemctl mask sshd

'systemctl is-enabled' reports whether a unit is enabled to start at boot (enabled, disabled, static, masked, etc.). 'is-active' reports current runtime state rather than boot behavior, and 'mask' prevents a unit from being started at all.

System Management

Which command displays the block devices and their partition/LVM layout in a tree format, including mount points?

  • a.df -h
  • b.fdisk -l
  • c.blkid
  • d.lsblk

'lsblk' lists block devices in a tree showing disks, partitions, LVM volumes, sizes, and mount points. 'df -h' reports filesystem usage on mounted filesystems, 'blkid' shows UUIDs and types, and 'fdisk -l' shows partition tables but not a clean mount-point tree.

System Management

In an /etc/fstab entry, which field value causes a filesystem to be checked by fsck first (before other filesystems) at boot?

  • a.The dump field set to 1
  • b.The pass (fsck order) field set to 1
  • c.The mount options field set to defaults
  • d.The pass field set to 0

The sixth field in fstab is the fsck pass order: 1 is reserved for the root filesystem and is checked first, 2 for other filesystems, and 0 disables the check. The fifth (dump) field controls the legacy dump utility, not fsck ordering.

Report