how to

What command is used to get the kernel version in Linux Ubuntu

 

What is the command used to get the kernel version in Linux? Get information on the latest kernel version on Linux Ubuntu.

3 commands to check the kernel in Linux

1.uname

uname displays information about the machine and the operating system on which it is running. If no options are specified, uname acts as if the -s option was specified. If multiple options or ‘-a’ are specified, the selected information is printed in the following order:

CORE NAME HARDWARE PLATFORM HARDWARE PLATFORM OPERATING SYSTEM

There are three uname commands to know about the Linux kernel: uname -r, uname -v, and uname -s.

“Uname -r” displays the kernel version. The “uname -s” command displays the name of the kernel. The kernel name can be the same as the operating system name typed with the “-o” or “–operating-system” option, but it can be different. Some operating systems (eg FreeBSD, HP-UX) have the same name as their kernels; others (eg GNU / Linux, Solaris) do not. The “uname -v” command displays the kernel version.

2. / proc / version

The / proc / version file specifies the Linux kernel version, the gcc version used to compile the kernel, and the kernel compilation time. It also contains the username of the kernel compiler (in parentheses).


cat /proc/version

3.dmesg

kernel

dmesg – display message or driver message – used to check or manipulate the kernel ring buffer. It has the syntax “dmesg [-c] [-n level] [-s bufsize]”. The default action is to display all messages from the kernel’s ring buffer. And the “grep” option prints lines containing a pattern match.


dmesg | grep Linux

 

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button