Wallpapers Forums Login

Shell Command To Find What Linux Kernel Version Have Installed In Unix Box

today i wanted to find out what kernel version i had installed in my server, i can't believe i cound remember the command to find what version i had installed in my server linux box, but i found it, so just in case anyone outhere is also having the same question i will give you the command.

note, this worked for me, i have fedora core on my server, which i think will also work on red had, centos, but not sure if it will work on other distributions like suse, mandrake or Debian.

CODE:
rpm -qa | grep 'kernel'


here are some others, but the one above worked great for me

CODE:
$ rpm -q kernel kernel-headers kernel-ibcs kernel-pcmcia-cs kernel-source

kernel-2.0.36-0.7
kernel-headers-2.0.36-0.7
kernel-ibcs-2.0.36-0.7
kernel-pcmcia-cs-2.0.36-0.7
kernel-source-2.0.36-0.7

$ rpm -q mkinitrd SysVinit initscripts

mkinitrd-1.8-3
SysVinit-2.74-5
initscripts-3.78-1


If you have Red Hat Linux 4.2 on your machine, you will need to change the query slightly to reflect name changes in packages that occurred in the Red Hat Linux 5.x series of releases.
CODE:
$ rpm -q kernel kernel-headers kernel-source iBCS pcmcia-cs

kernel-2.0.35-0
kernel-headers-2.0.35-0
kernel-modules-2.0.35-0
kernel-source-2.0.35-0
iBCS-2.0-8
pcmcia-cs-2.9.12-0

$ rpm -q mkinitrd SysVinit initscripts

mkinitrd-1.7-1
initscripts-2.96-1
SysVinit-2.64-8


you can also use the uname command like this:

CODE:
uname -r

NAME
       uname - print system information

SYNOPSIS
       uname [OPTION]...

DESCRIPTION
       Print certain system information.  With no OPTION, same as -s.

       -a, --all
              print  all  information,  in the following order, except omi  -p
              and -i if unknown:

       -s, --kernel-name
              print the kernel name

       -n, --nodename
              print the network node hostname

       -r, --kernel-release
              print the kernel release

       -v, --kernel-version
              print the kernel version

       -m, --machine
              print the machine hardware name

       -p, --processor
              print the processor type or "unknown"

       -i, --hardware-platform
              print the hardware platform or "unknown"

       -o, --operating-system
              print the operating system

       --help display this help and exit

       --version
              output version information and exit
Sanket Wed Nov 30, 2011
thanx for your reply....
jay Fri Feb 04, 2011
uname -r works on all linuxes (and maybe even more)
for more information: uname -a
kalyankumar Wed Oct 29, 2008
ya thanks for your valuable answer
Hajo Sat Sep 20, 2008
das shell-kommando rpm -qa | grep 'kernel'
funktioniert auch bei suse linux vers. 9.1
(um die aktuelle kernelverson festzustellen)
jesus Fri Jun 27, 2008
uname -r

that one works well
sushil Wed Jan 30, 2008
hi,this sushil iwant to know how the shell and kernel works in unix operating system
Deepak Tue Jan 15, 2008
how to find that which os in installed in our pc?
Madhusudan Mon Feb 26, 2007
Give me all commands in UNIX
lin Sat Feb 10, 2007
this is a great way to how to find what kernel i have thanks
call130392 - at - Google Fri Aug 17, 2012
i don`t understand command shell. you may be help? im thank!

Related Content

Information

Share

wallpaperama | Wallpapers | Forums | Terms Of Service

copyright © 2013 wallpaperama - All Rights Reserved - Last Updated Mon May 06, 2013 (-8 GMT)
Powered by: Webune Forums V5