CompTIA Linux+ XK0-006 (V8) Practice Question

You are preparing an Ubuntu 22.04 server image that will be booted inside an on-premises KVM cluster. A NoCloud datasource will supply the following user-data to cloud-init:

#cloud-config
package_update: true
packages:
  - nginx
write_files:
  - path: /var/www/html/index.html
    content: |
      <h1>Hello from cloud-init</h1>
<SECTION GOES HERE>

The goal is to enable and start nginx only after the package has finished installing and before the first login prompt appears. Which cloud-init section name should replace <SECTION GOES HERE> so the command systemctl enable --now nginx executes at the correct point in the first-boot sequence?

  • write_files

  • cloud-init-per

  • bootcmd

  • runcmd

CompTIA Linux+ XK0-006 (V8)
Automation, Orchestration, and Scripting
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot