Linux: Get Kernel Version

Objective: Find out the kernel version / release that is currently running on any Linux distribution.

The uname command can be used to print out the kernel version, hardware type, processor, operating system and various other information.

To print the kernel version, use the following command syntax.

$ uname -r

The above output is from Ubuntu 12. Linux kernels are normally identified by a set of three to four numbers, sometimes supplemented by several additional characters.

The first number,3, denotes the kernel version. The second number,13, denotes the major revision of the kernel version. The third number,0, indicates the minor revision of the kernel. The fourth number,32, represents corrections, such as security patches and bug (i.e., error) fixes. The string “generic” is a distribution specific string.

You can also get the kernel version from the proc filesystem by reading the /proc/version file. Extract just the third field (kernel version) from the file using the following syntax.

$ cat /proc/version | cut -d " " -f 3

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }