Finding about which OS is running via shell script
Paul Smith
paul at mad-scientist.net
Sat Apr 27 14:05:12 UTC 2013
On Sat, 2013-04-27 at 05:34 -0400, Tom H wrote:
> Except that you can have, for example, yum installed on Ubuntu or
> apt-get installed on Fedora.
In fact I do this all the time, because I'm cross-building packages for
different distributions.
The standard, approved way, as I wrote right at the beginning of the
thread, is to use the lsb_release program. All other methods suggested
here are just heuristics based on a limited set of distributions with no
standardization. lsb_release is part of Linux Standard Base which,
while not getting the love I wish it had, is still at least nominally
adhered to by most every distribution.
More information about the ubuntu-users
mailing list