nerdexam
CompTIACompTIA

XK0-005 · Question #1390

XK0-005 Question #1390: Real Exam Question with Answer & Explanation

The correct answer is A: -u. The -y flag is used with package managers like yum or apt to automatically confirm prompts, enabling unattended package upgrades in scripts.

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

Explanation

The -y flag is used with package managers like yum or apt to automatically confirm prompts, enabling unattended package upgrades in scripts.

Common mistakes.

  • A. The -u flag is typically associated with specifying a user for commands like chown or sudo, not for unattended package upgrades.
  • B. The -q flag makes the output quiet or silent, but it does not automatically confirm prompts during package upgrades.
  • D. The -d flag is often used for debugging or to download packages without installing them, which does not facilitate unattended upgrades.

Concept tested. Linux package manager flags for unattended operations

Reference. https://linux.die.net/man/8/apt

Topics

#Package Management#apt#yum#Automation

Community Discussion

No community discussion yet for this question.

Full XK0-005 PracticeBrowse All XK0-005 Questions