Courseiva
System Architecture →easyMultiple Choice

LPIC-1 System Architecture Practice Question

A technician needs to output only the kernel release number. Which command should be used?

⚠ Common exam trap

It's easy for candidates to confuse `/proc/version` (which shows the full version string) with a command that outputs only the release number, or they assume `dmesg` output is consistent across all systems.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

uname -r

The `uname -r` command specifically prints the kernel release number (e.g., '5.10.0-28-amd64') by querying the `utsname` system call. This is the standard, portable way to retrieve only the kernel release string without additional system information.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    cat /proc/version

    Why it's wrong here

    /proc/version contains the kernel release plus compiler version, build date and distribution string, so it does not output only the release number. It is tempting because it is a kernel information file, and it would be correct when the full build and compiler details are genuinely needed.

  • ✓

    uname -r

    Why this is correct

    `uname -r` prints just the kernel release string, such as 6.8.0-45-generic, satisfying the requirement to output only the kernel release number. Other `uname` flags return different fields: `-a` shows everything, `-s` the kernel name, and `-v` the build version, so none isolates the release.

  • ✗

    dmesg | head -1

    Why it's wrong here

    dmesg prints kernel ring buffer messages, whose first line is a boot timestamp and hardware summary, not a release number. It is tempting because dmesg reports kernel activity, and it would be correct when diagnosing boot-time hardware or driver errors rather than identifying the running kernel version.

  • ✗

    lsmod

    Why it's wrong here

    lsmod lists currently loaded kernel modules, so it cannot print the kernel release string at all. It is tempting because both concern the running kernel, and lsmod would be the right tool to inspect which modules are loaded, but the release number comes from uname -r.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 402 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.