Linux Survival Basics
Read-onlyCompare Kernel and Distro Versions
You need to know whether a package issue is tied to the OS release, the running kernel, or the CPU architecture.
Command
printf 'kernel=%s arch=%s distro=%s\n' "$(uname -r)" "$(uname -m)" "$(lsb_release -ds)"
Before you run this
System impact: Read-only. Low when scoped to the shown target.
When not to use it: Do not treat the kernel version as the installed kernel package list.
Expected output
A single support-friendly inventory line with kernel, architecture, and distro.
System impact
Read-only. Nothing changes. The command combines kernel, architecture, and distro description in one line.
Recovery / rollback: no state is changed.
When to use it
Use when opening support tickets, comparing fleet nodes, or checking whether the running kernel matches package expectations.
When not to use it
Do not treat the kernel version as the installed kernel package list.
next steps
Related commands
Fingerprint a Debian or Ubuntu Host
Before package triage, prove what OS family and release you are actually on.
. /etc/os-release && printf '%s %s %s\n' "$ID" "$VERSION_ID" "$VERSION_CODENAME"
Show Running Kernel Version
Never delete the kernel you are running.
uname -r
Count Source Files by Extension
A quick extension count can show whether expected content made it into the source tree.
find source -type f -printf '%f\n' | sed -n 's/.*\.//p' | sort | uniq -c | sort -nr
List Installed RPM Kernels
RPM systems keep multiple kernels too.
rpm -q kernel
List Installed Package Versions
A package inventory beats memory when a server is drifting.
dpkg-query -W -f='${Package}\t${Version}\t${Architecture}\n' | 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.