Signal9Signal9 — home
online
back to labs

Which Package Owns This File?

EasyLFCS Prep10 min
The brief

You found a binary on the system and need to know which package installed it, for patching, auditing, or removal. /root/task.txt names the file (it differs per session, and the package is usually NOT named after the binary). On Debian/Ubuntu, dpkg maps files back to their owning package:

dpkg -S /path/to/file

That prints 'PACKAGE: /path/to/file'. Record just the package NAME (the part before the colon) to /root/answers/owner.txt. (On RHEL the equivalent is rpm -qf FILE: same idea, different tool.)

What you'll do
  • Record the package that owns the file in /root/task.txt to /root/answers/owner.txt

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.