LPIC-1 Linux Installation and Package Management Practice Question
A Linux administrator is configuring a CentOS 7 server and needs to manage software packages using the native RPM toolset. The administrator wants to perform two tasks: (1) verify the integrity of an installed package against its original metadata, and (2) list all files installed by a specific package. Which TWO commands should the administrator use? (Choose two.)
⚠ Common exam trap
The trap here is mixing up rpm query options: -V verifies, -ql lists files, -qi gives info, and -qf finds owner. Confusing these can lead to selecting commands that do not perform the needed tasks.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
rpm -ql package_name
The correct commands are rpm -V for verifying package integrity and rpm -ql for listing installed files. These directly address the two tasks: verification checks file attributes against the RPM database, and query list enumerates all files from a package. The other options provide different types of package information and do not fulfill the requirements.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
rpm -q --changelog package_name
Why it's wrong here
rpm -q --changelog displays the changelog information for a package, showing version history and changes. It does not verify file integrity or list files. This command is useful for auditing updates but does not meet either of the stated tasks.
- ✗
rpm -qi package_name
Why it's wrong here
rpm -qi displays general information about an installed package, such as version, release, install date, and description. It does not verify file integrity or list files. While useful for package details, it does not accomplish either specified task.
- ✓
rpm -ql package_name
Why this is correct
rpm -ql (or --query --list) lists all files that are installed by the specified package. This directly satisfies the second requirement to enumerate package contents. It queries the RPM database and outputs the full file paths.
- ✗
rpm -qf /path/to/file
Why it's wrong here
rpm -qf identifies which package owns a given file. It is the reverse of listing files and does not verify integrity. It would not help the administrator verify a package or list its files, so it is not applicable here.
- ✓
rpm -V package_name
Why this is correct
rpm -V (or --verify) compares the installed files of a package against the metadata stored in the RPM database, checking size, MD5 checksum, permissions, and other attributes. It is the correct tool to verify package integrity and detect modifications, fulfilling the first requirement.
Go deeper
Related to this question
About these practice questions
One of 402 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official LPI exam blueprint
This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.