Linux and Command-Line Basics
Which of the following is the main function of a Linux package management system (apt on Debian-based systems, dnf on Red Hat-based systems and so on)?
- ABundling several files and directories into one compressed file so that they are easy to send to another computer
- BAlways compiling the source code of the software on the spot and optimizing it for the CPU in use before installing it
- CFetching software from repositories and managing installation, updates and removal, including the packages it depends on
Show answer and explanation
Answer: C. Fetching software from repositories and managing installation, updates and removal, including the packages it depends on
A package management system handles software in units called packages, fetches them from distribution servers (repositories), and installs, updates and removes them. It automatically finds the other packages that a package needs in order to work (its dependencies) and installs them together, and it records the list of installed files so that removal and updates are clean. Installing into the system with apt or dnf generally requires root privileges, so they are run with sudo. Some software, such as commercial EDA tools, is installed with its own installer without going through the package management system.
- A. Bundling and compressing files is the job of tar, gzip, zip and the like.
- B. Packages installed with apt or dnf are usually precompiled and are not compiled on the spot.
- C. Correct. It manages installation, updates and removal, including dependencies.