Linux Labs

Packages, services, and logs / Stage 2 of 13

Installed packages and their files

Not running Starting usually ~20 s
Leave the lesson

Step 3 of 8 · on a machine · 5 min

Whose file is it

A file has two different "owners": the package that installed it, and the user it belongs to. Look at both for the program the package put into /usr/bin.

Exercise · look

The package and the file owner

Ask dpkg which package installed /usr/bin/lab-pkg-report, and look at the permissions and owner of that file.

First, predict

Whom will ls -l show as the owner of /usr/bin/lab-pkg-report?

Now start the exercise, run the command and compare your prediction with the output.

Sign in and start The machine is available after signing in

dpkg -S looks a path up in the file lists of all packages and prints the package that installed it. ls -l shows the owning user: files from packages belong to root, because dpkg placed them while running as root.

The package answers "what brings the file back", the user answers "who may change it".

Ubuntu 24.04
Loading…