LPIC-1 Administrative Tasks Practice Question
An administrator needs to determine which package owns the file /usr/bin/htop on a Debian-based system so that the package can be reinstalled after corruption. Which command provides this information?
⚠ Common exam trap
Many exam-takers confuse the direction of the lookup, using a command that lists a package's files instead of one that finds the package owning a file.
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
✓
dpkg -S /usr/bin/htop
On Debian-based systems, the local package database tracks which package installed each file. The dpkg search option queries that database by file path, returning the owning package, which is precisely the reverse lookup needed before reinstallation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
dpkg -S /usr/bin/htop
Why this is correct
dpkg -S (or --search) queries the local package database for the package that owns a given file path. This is the direct, accurate way to map an installed file back to its package on a Debian-based system, which is exactly what the administrator needs before reinstalling the corrupted package.
- ✗
dpkg -L htop
Why it's wrong here
dpkg -L lists the files installed by a named package, which is the reverse of what is needed. It requires knowing the package name already and will not help discover which package owns /usr/bin/htop. The administrator needs the opposite lookup, from file to package.
- ✗
apt-file search /usr/bin/htop
Why it's wrong here
apt-file searches repository contents for files, which can identify packages containing a path, but it queries remote or cached index data rather than the installed package database. It may return packages not installed and is not the direct tool for confirming ownership of an already-installed file.
- ✗
apt-cache show htop
Why it's wrong here
apt-cache show displays metadata about a named package, such as version, dependencies, and description, but it does not map files to packages. It also requires knowing the package name in advance, so it cannot answer which package owns /usr/bin/htop.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.