Howto: find the Linux kernel version?

The ‘uname‘ command is use to determine certain system information in all the Linux/Unix flavours like CentOS, Ubuntu, Debian, Fedora, FreeBSD etc. With specific ‘uname’ options, you can display all the details of the current working kernel on the server.

To display the working kernel name, version, date and time, system architecture type etc, use:

# uname -a
Linux server.domain.tld 2.6.18-164.11.1.el5 #1
SMP Wed Jan 20 07:39:04 EST 2010 i686 i686 i386 GNU/Linux

To print only the kernel version along with it’s major and minor versions:

# uname -r
2.6.18-164.11.1.el5

To print the system architecture type i.e. whether the machine is 32 or 64 bit, use:

# uname -p
i686

The /proc/version file also contains the kernel information:

# cat /proc/version
Linux version 2.6.18-164.11.1.el5 (gcc version 4.1.2 20080704 
(Red Hat 4.1.2-46)) #1 SMP Wed Jan 20 07:39:04 EST 2010
This entry was posted on Friday, September 2nd, 2011 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.