[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Determine system ver (Debian vs. other Linuxes) at runtime?



On Sun, 1 Jan 2006 15:10:23 -0800
David Kirchner <dpk@dpk.net> wrote:

> I don't know of an API method for this (it may be that there is none)
> but one way you can try to tell is by running:
> 
> strings /lib/libc.so.6 | egrep "^Compiled by". On Debian sarge you
> see:
> 
> Compiled by GNU CC version 3.3.5 (Debian 1:3.3.5-12).
> 
> and on RedHat 7.3:
> 
> Compiled by GNU CC version 2.96 20000731 (Red Hat Linux 7.3 2.96-113).
> 
> Dunno about the rest of the distributions.

Good call.  Here's what Ubuntu Breezy tells me:
Compiled by GNU CC version 3.4.5 20050809 (prerelease) (Ubuntu
3.4.4-6ubuntu8).

Cybe R. Wizard
-- 
Linux -- "It's computing, Jim, but not as we know it"



Reply to: