CompTIA Linux+ V8 Free Sample Questions

Description

Covers basic Linux concepts and storage management, file and local account administration, authentication, firewalls and OS hardening, shell scripting and Python basics, and network troubleshooting.

12 free sample questions161 in the full practice test Other versions: XK0-004(218),XK0-005(279)

Try simulator

XK0-006 Sample Questions

  1. Question 1

    Intermediate

    System Management · Basic boot process

    A system administrator needs to pass a custom kernel parameter temporarily during the boot process to troubleshoot a video driver issue. Which of the following is the CORRECT procedure to accomplish this without making the change permanent across reboots?

    Answer and explanation

    Correct answer: B

    Pressing 'e' at the GRUB menu allows you to temporarily edit the boot entry for that specific session. Appending the parameter to the kernel line (starting with linux or linux16) and booting with Ctrl+X applies the parameter only once. Editing /etc/default/grub makes the change persistent, which violates the requirement for a temporary change.

  2. Question 2

    Beginner

    System Management · Server architectures

    True or False: RISC-V is an open-standard instruction set architecture (ISA) based on established reduced instruction set computer principles, which allows organizations to build custom Linux-compatible processors without paying licensing fees.

    Answer and explanation

    Correct answer: A

    RISC-V is a widely adopted open-standard ISA provided under open-source licenses. Unlike proprietary architectures (such as x86 or ARM), it does not require licensing fees, making it an increasingly popular choice for custom hardware and embedded Linux systems.

  3. Question 3

    Intermediate

    System Management · Graphical User Interface (GUI)

    A Linux engineer is migrating desktop environments from X11 to Wayland. They need to explain the architectural differences to the security team. Which of the following statements ACCURATELY describes a key difference between Wayland and X11?

    Answer and explanation

    Correct answer: C

    In the Wayland architecture, the compositor IS the display server. Clients communicate directly with the compositor, which securely handles input and rendering. This eliminates the legacy X11 design where any application could eavesdrop on other applications' input events via the X server.

  4. Question 4

    AdvancedMultiple answers

    System Management · Kernel modules

    A hardware engineer is troubleshooting a malfunctioning network interface card. They need to remove the current kernel module and load a patched version while ensuring all module dependencies are automatically resolved. Which TWO commands should the engineer use? (Select TWO)

    Answer and explanation

    Correct answers: B, D

    The 'modprobe' command is the modern standard for managing kernel modules because it automatically resolves and loads/unloads dependencies using the modules.dep file. The '-r' flag removes the module and its unused dependencies. 'rmmod' and 'insmod' do not handle dependencies automatically.

    The 'modprobe' command intelligently loads the module and any prerequisites it depends on. This makes it superior to 'insmod', which requires manual dependency loading.

  5. Question 5

    Intermediate

    System Management · Logical Volume Manager (LVM)

    Background:
    CorpNet Inc. has deployed a database server running on Rocky Linux. The database resides on an XFS filesystem within a logical volume named 'lv_db' which belongs to the volume group 'vg_data'.

    Current Situation:
    The database team has reported that the filesystem is 95% full. The system administrator has physically added a new 500GB disk (/dev/sdc) to the server.

    Requirements:
    The administrator must expand the existing 'lv_db' logical volume and its underlying XFS filesystem dynamically, utilizing the entire new disk without unmounting the volume or causing database downtime.

    Which sequence of commands BEST accomplishes this requirement?

    Answer and explanation

    Correct answer: A

    To expand LVM storage onto a new disk: First, initialize the disk as a physical volume (pvcreate). Second, add it to the volume group (vgextend). Third, extend the logical volume to use the newly available space (lvextend). Finally, grow the XFS filesystem natively online (xfs_growfs). XFS cannot be resized with resize2fs, which is for ext-based filesystems.

    flowchart TD A[pvcreate /dev/sdc] --> B[vgextend vg_data /dev/sdc] B --> C[lvextend -l +100%FREE lv_db] C --> D[xfs_growfs /dev/vg_data/lv_db]
  6. Question 6

    Beginner

    System Management · Filesystems

    A systems architect is designing a storage solution for a high-performance database. They require a Linux filesystem that natively supports Copy-on-Write (CoW) snapshots and subvolumes for efficient backup procedures. Which of the following filesystems provides these features natively?

    Answer and explanation

    Correct answer: C

    Btrfs (B-Tree Filesystem) is a modern Linux filesystem designed with native support for advanced features like Copy-on-Write (CoW) snapshots, dynamic subvolumes, and built-in RAID. Ext4 and XFS are high-performance journaling filesystems but require LVM to achieve snapshot functionality.

Register free for 6 more questions

Or unlock all 161 XK0-006 questions with explanations, timed mode and flashcards.