Courseiva
Linux Installation and Package ManagementmediumMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

Exhibit

ii  adduser         3.118          all          Add and remove users and groups
ii  apt             2.0.9          amd64        commandline package manager
ii  base-files      11             amd64        Debian base system miscellaneous files
ii  base-passwd     3.5.47         amd64        Debian base system master password and group files
ii  bash            5.0-6          amd64        GNU Bourne Again SHell

Refer to the exhibit. The system administrator wants to determine which package provides the file /etc/passwd. Based on the output, which command would be most appropriate to find the package?

⚠ Common exam trap

Many candidates confuse `dpkg -S` (search for file) with `dpkg -L` (list files of a known package), or they incorrectly use `apt-cache` or `apt-file` which operate on repository data rather than the installed package database.

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 /etc/passwd`

`dpkg -S /etc/passwd` queries the dpkg database to find which installed package owns the specified file. This is the standard Debian/Ubuntu command to map an absolute path to its originating package, making it the most appropriate choice for the administrator's goal.

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 -L base-passwd`

    Why it's wrong here

    Lists files of a known package, not the reverse.

  • `apt-file search /etc/passwd`

    Why it's wrong here

    Requires apt-file to be installed; not immediate.

  • `dpkg -S /etc/passwd`

    Why this is correct

    Searches for the package that owns the file.

  • `apt-cache show /etc/passwd`

    Why it's wrong here

    Cannot search for files.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.