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
- A. apt-get upgrade, apt-get dist-upgrade, apt-get update
- B. apt-get update, apt-get upgrade, apt-get dist-upgrade
- C. apt-get dist-upgrade, apt-get upgrade, apt-get update
- D. apt-get update, apt-get dist-upgrade, apt-get upgrade
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.