- Forums
- Linux Hosting
- Shell Command To Find What Linux Kernel Version Have Installed In Unix Box
this page shows you what commmands you can use to find out what or which version of the linux kernel you have installed in your linux box very handy shell commands [407], Last Updated: Sat May 18, 2024
pinguin
Sat Jan 13, 2007
10 Comments
12017 Visits
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
https://www.wallpaperama.com/forums/shell-command-to-find-what-linux-kernel-version-have-installed-in-unix-box-t710.html