Courseiva
Linux Installation and Package ManagementmediumMultiple ChoiceObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

A Linux administrator is managing a server that uses RPM-based package management. They need to find which installed package provides the '/etc/ssh/sshd_config' file. Which command should they use?

⚠ Common exam trap

It's easy for candidates to confuse the purpose of RPM query options: `-qi` (package info), `-ql` (file list), and `-qf` (file ownership), and often pick `-ql` thinking it lists files, but fail to realize it requires a package name, not a file path.

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 -qf /etc/ssh/sshd_config

The correct command is `rpm -qf /etc/ssh/sshd_config`. The `-q` flag queries the RPM database, and `-f` (or `--file`) tells RPM to find which installed package owns the specified file. This is the standard way to map a file back to its originating package in RPM-based systems.

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 -qi /etc/ssh/sshd_config

    Why it's wrong here

    Shows package info, but expects a package name.

  • rpm -qf /etc/ssh/sshd_config

    Why this is correct

    Queries the package that owns the file.

  • rpm -ql /etc/ssh/sshd_config

    Why it's wrong here

    Lists files in a package, not the package for a file.

  • rpm -qa | grep sshd_config

    Why it's wrong here

    Lists all packages and greps, inefficient and may not work.

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.