Which command displays the current running kernel version on a Linux system? Learn why uname -r is the standard method for quickly checking your Linux kernel version—essential for CompTIA Linux+ (Plus) XK0-005 exam success.
Table of Contents
Question
Which command displays the current running kernel version on a Linux system?
A. cat /etc/os-release
B. lsb_release -a
C. hostnamectl
D. uname -r
E. sysctl -a
Answer
D. uname -r
Explanation
The uname -r command outputs the kernel release version (e.g., 5.15.0-73-generic), providing a quick way to check the current kernel, aligning with system administration tasks.
The command that displays the current running kernel version on a Linux system is uname -r.
The uname command is the primary tool for checking kernel information on Linux systems. The -r option specifically outputs the kernel release version, providing a concise and direct answer to which kernel is currently running.
Example usage:
uname -r
This command returns output such as 5.15.0-91-generic or 6.2.15-300.fc38.x86_64, which represents the running kernel version.
While other commands like hostnamectl, cat /proc/version, and dmesg | grep “Linux version” also provide kernel information, uname -r is the most straightforward and widely recommended method for this specific purpose.
uname -r outputs the running kernel release version, making it the standard and most efficient command for this task in Linux system administration.
CompTIA Linux+ (Plus) XK0-005 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the CompTIA Linux+ (Plus) XK0-005 exam and earn CompTIA Linux+ (Plus) XK0-005 certification.