How to find GNU/Linux kernel version ?

Hi all, We know that in gnu/linux and most of all operating systems kernel is heart of Operatin Sytem. On all major linux distribution we can check linux kernel version with “uname” command.

In this article we will show you some commandline options [switches] which will be useful along with uname command. For knowing all kernel related info we can use uname -a. This command can be used on any gnu/linux.

on UBUNTU linux we can view content of file /etc/*release* to get information of installed operating system [OS] e.g.

    root@andy-desktop:~#cat /etc/*release*
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=8.10
    DISTRIB_CODENAME=intrepid
    DISTRIB_DESCRIPTION="Ubuntu 8.10"

Also we can use cat /etc/issue command to get details about installed OS.
If you want to know kernel version no then we can use uname -r It will display output something like below.

    root@andy-desktop:~# uname -r
    2.6.27-7-generic

on DEBIAN linux you can use :

    root@andy-desktop:~#cat /var/log/installer/lsb-release
    DISTRIB_ID=Debian
    DISTRIB_DESCRIPTION="Debian GNU/Linux installer"
    DISTRIB_RELEASE="5.0 (lenny) - installer build 20090123lenny1"
    X_INSTALLATION_MEDIUM=cdrom
    cat /etc/debian_version

On CentOs / RedHat box you can try :

    root@andy-desktop:~#cat /etc/redhat-release
    CentOS release 5.3 (Final)
    root@andy-desktop:~#cat /etc/issue
    OR
    Generic commands which can be used on any gnu/linux system.
    uname [with switches]

Back to top