Which command displays the current kernel version?

Prepare for the Red Hat Certified Systems Admin Exam EX200. Enhance your skills with interactive quizzes, flashcards, and detailed explanations. Ace your certification exam today!

Multiple Choice

Which command displays the current kernel version?

Explanation:
The current kernel version is shown directly with the uname command using the -r flag. uname -r prints only the kernel release, giving you the exact version running on the system (for example, 5.14.0-1051...). This is the most straightforward and portable way across Linux distributions to verify the active kernel. Other methods provide more or different details but aren’t as precise or reliable for just the version: cat /proc/version includes build and compiler details; uname -a outputs full system information in addition to the kernel version; hostnamectl may show a Kernel line on some distros but isn’t guaranteed to be present or accurate everywhere.

The current kernel version is shown directly with the uname command using the -r flag. uname -r prints only the kernel release, giving you the exact version running on the system (for example, 5.14.0-1051...). This is the most straightforward and portable way across Linux distributions to verify the active kernel.

Other methods provide more or different details but aren’t as precise or reliable for just the version: cat /proc/version includes build and compiler details; uname -a outputs full system information in addition to the kernel version; hostnamectl may show a Kernel line on some distros but isn’t guaranteed to be present or accurate everywhere.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy