How do u obtain the version of the kernel i am currently using?? I am using Red Hat (9.0) shrike.. is there a command or configuration file for the same..
Printable View
How do u obtain the version of the kernel i am currently using?? I am using Red Hat (9.0) shrike.. is there a command or configuration file for the same..
take a look at "uname". it gives you exactly what you want to know.
run "uname -a" for a nice overview.
If you just want the kernel version, for a script perhaps or other purposes, use 'uname -r', the -a option will present all of the available information which may or may not be what you need. See the man page, 'man uname', for all the avilable options.
You can learn kernel version
*1*****************
with uname
-r, --kernel-release
Print the release number of the kernel.
-s, --kernel-name
Print the name of the kernel (Linux). This is the default action.
-v, --kernel-version
Print build information about the kernel.
like
$uname -r
*2*******************
$cat /etc/proc
*3********************
u can write small program as like uname() bash functions /usr/src/linux...kernelsources
in there u should find /include/linux/version.h
....
#define UTS_RELEASE "2.6.0"
#define UTS_RELEASE "2.6.0"
#define LINUX_VERSION_CODE 132608
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
u can post it ur source
the command is uname -r
use uname -rQuote:
Originally Posted by superghost
see man pages for uname
regards
vijay.G