[ale] Universal way to determine distro?

Geoffrey esoteric at 3times25.net
Thu Jul 20 10:41:26 EDT 2006


Geoffrey wrote:
> Jeffrey B. Layton wrote:
>> Good morning,
>>
>>    I guess this shows my lack of knowledge but is there a
>> universal way to determine what distro a particular machine
>> is running? I'd like to do this from bash or python, but I
>> can't think of nor google anything useful. Any ideas?
> 
> Generally you'll find distro info in the /etc/*release file(s), although 
> that's easily changed.
> 
> Slackware uses a different file, but I can't recall the name.  It's in 
> the /etc directory as well, I think it has the word 'version' in it.

On rpm based distros (SuSE, Red Hat, Mandriva) you can look for a 
*release* rpm as follows:

rpm -qa|grep -i release

I don't know about debian based.

-- 
Until later, Geoffrey

Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.  - Benjamin Franklin



More information about the Ale mailing list