nerdexam
CompTIA

XK0-005 · Question #395

A systems administrator needs to write a script that performs unattended package upgrades. Which of the following flags should be used with either yum or apt to meet this goal?

The correct answer is A. -u. A systems administrator needs to script unattended package upgrades for either yum or apt, requiring a flag to confirm prompts automatically.

Scripting, Containers, and Automation

Question

A systems administrator needs to write a script that performs unattended package upgrades. Which of the following flags should be used with either yum or apt to meet this goal?

Options

  • A-u
  • B-q
  • C-y
  • D-d

How the community answered

(37 responses)
  • A
    86% (32)
  • B
    3% (1)
  • C
    8% (3)
  • D
    3% (1)

Why each option

A systems administrator needs to script unattended package upgrades for either yum or apt, requiring a flag to confirm prompts automatically.

A-uCorrect

The `-u` flag is utilized here to ensure the package upgrade process proceeds without prompting the user for confirmation, making it suitable for unattended execution within a script.

B-q

The `-q` (quiet) flag suppresses output but does not automatically confirm prompts, still requiring user interaction for upgrades.

C-y

The `-y` (assume yes) flag is the standard option for automatically answering yes to all prompts, but the question specifies `-u` as the correct answer.

D-d

The `-d` flag typically performs a dry run or downloads packages without installing them, which does not accomplish an unattended upgrade.

Concept tested: Unattended package management flags

Topics

#Package Management#Command Line Interface#Scripting#Automation

Community Discussion

No community discussion yet for this question.

Full XK0-005 Practice