How to determine Kernel version

Rick Stevens rstevens at vitalstream.com
Thu Feb 26 20:58:41 UTC 2004


Richard Welty wrote:
> On Wed, 25 Feb 2004 23:10:12 -0500 (EST) Richard Welty <rwelty at averillpark.net> wrote:
> 
>>On Wed, 25 Feb 2004 22:51:57 -0500 ed <ed at gurski.com> wrote:
>>
>>>I was under the impression that the orignal post was to determine which
>>>kernel was the currently running kernel.
> 
> 
>>i still don't understand why
> 
> 
>>$ uname -r
> 
> 
>>won't suffice in that case.
> 
> 
> i'm going to amend this slightly:
> 
> in heterogenous environments, where the systems are generally
> unix or unix-like, you may wish to script with
> 
> uname -rs
> 
> to get identification of the OS.
> 
> on a fedora fc1 desktop in my office:
> 
> $ uname -rs
> Linux 2.4.22-1.2149.nptl
> 
> on my rh8.0 laptop:
> 
> $ uname -rs
> Linux 2.4.18-14
> 
> on an OpenBSD 3.3 system in my (basement) lab:
> 
> $ uname -rs
> OpenBSD 3.3
> 
> on the Solaris 8 system in the basement:
> 
> $ uname -rs
> SunOS 5.8
> 
> there is some inconsistency in the implementation of
> uname across unix systems, for example on solaris
> you might want to add the -v option:
> 
> $ uname -rsv
> SunOS 5.8 Generic_108528-14
> 
> but the -v isn't especially useful on linux.

-v does give you the number of times the kernel source was "make dep"ed
and the date and time of the kernel build.  I'd call that useful.

> even with the inconsistency, it's still better than an
> rpm hack which only works on a subset of linux
> distributions.

Amen, brother.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-              Never eat anything larger than your head              -
----------------------------------------------------------------------





More information about the users mailing list