Package log basics
Inspect simulated package activity without installing anything.
Understand the pattern
Recent package changes can explain new failures.
grep- Select input lines that match a pattern; -i ignores case, -n adds line numbers, and -v inverts selection.
No matches is exit status 1, which is different from a malformed invocation.
tail- Show the end of an input; -n selects the number of lines.
This browser lab snapshots output; it does not keep a live tail -f stream.
wc- Count input. -l counts newline characters, -w counts whitespace-delimited words, and -c counts bytes.
Text without a final newline may have fewer counted lines than visible rows.
Worked example and expected result
$ grep install /var/log/dpkg.log2026-05-26 08:00:00 install fake-nginx 1.0 2026-05-26 08:02:00 status installed fake-nginx 1.0
Exit status: 0. The command completed successfully in the training fixture.
$ tail -n 2 /var/log/dpkg.log2026-05-26 08:01:00 upgrade fake-openssh 9.9 2026-05-26 08:02:00 status installed fake-nginx 1.0
Exit status: 0. The command completed successfully in the training fixture.
$ wc -l /var/log/dpkg.log2 /var/log/dpkg.log
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Access log reviewTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.