Back to commands

Cybersecurity Triage

Dry run / preview

Preview 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

Cybersecurity Triage Dry run

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}'
Cybersecurity Triage Read-only

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
Cybersecurity Triage Sensitive output

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.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.