Cybersecurity Triage
Dry run / previewPreview Security Impact of dist-upgrade
A regular upgrade leaves packages behind and you need to preview the broader resolver plan without installing it.
Command
apt-get -s dist-upgrade | awk '/^Inst/ {print}'
Before you run this
System impact: Preview only. Still verify source and destination paths before running the real command.
When not to use it: Do not run the real dist-upgrade casually; review removals, new packages, and service impact first.
Expected output
Inst rows showing the broader package resolver plan, including security-origin kernel or library updates.
System impact
Dry run / preview. Nothing changes. apt-get simulates dist-upgrade and awk lists proposed package installations or upgrades.
Recovery / rollback: no state is changed.
When to use it
Use when kernel, libc, or dependency-chain security fixes are kept back by the normal upgrade path.
When not to use it
Do not run the real dist-upgrade casually; review removals, new packages, and service impact first.
next steps
Related commands
Simulate Security Package Upgrades
Security patch triage starts by seeing what apt would change, without changing it.
apt-get -s upgrade | awk '/^Inst/ && /security/ {print}'
Review Kept-Back Packages Before Patching
Kept-back packages are where simple upgrade plans stop being simple.
apt-get -s upgrade | sed -n '/kept back:/,/^Inst/p'
Build a Recent Apt Patch Timeline
Apt history turns patch claims into timestamps and package names.
awk '/^(Start-Date|Commandline|Upgrade|End-Date)/ {print}' /var/log/apt/history.log
Check Whether Databases Listen Publicly
The fastest database security check is the listening address.
ss -ltnp | awk '$4 ~ /:(5432|3306)$/ {print}'
Find SSH Key Users with sudo
The highest-priority access review starts where SSH keys and sudo overlap.
comm -12 <(find /home -path '*/.ssh/authorized_keys' -printf '%h\n' 2>/dev/null | awk -F/ '{print $(NF-1)}' | sort) <(awk -F: '$1=="sudo" {gsub(",","\n",$4); print $4}' /etc/group | sort)
Study mapping
Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.
Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.