CompTIA Linux+ (XK0-004) — Question 129

A systems administrator has scheduled a system update for a server. The update includes a resynchronization of the package database and updates to the current packages and the system distribution packages. Which of the following commands contains the proper order of this update?

Answer options

Correct answer: B

Explanation

The correct command sequence is B: 'apt-get update' first refreshes the package database, followed by 'apt-get upgrade' which upgrades the installed packages, and finally 'apt-get dist-upgrade' which handles changes in dependencies and installs new packages. The other options either place 'apt-get update' after the upgrades or mix the order incorrectly, leading to potential issues during the update process.