Finding about which OS is running via shell script

C de-Avillez hggdh2 at ubuntu.com
Sun Apr 28 01:44:00 UTC 2013


On Sat, 27 Apr 2013 15:01:47 -0400
Tom H <tomh0665 at gmail.com> wrote:

> On Sat, Apr 27, 2013 at 10:05 AM, Paul Smith <paul at mad-scientist.net>
> wrote:

<snip/>

> > 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.
> 
> "/etc/os-release" was created by the systemd developers [1]. Even
> Ubuntu's got it and Steam uses it.

Yes. Even Ubuntu has it. NOW. If one wants to cater for older versions,
one should use lsb_release. I would even use a mix of different
options, but I would not trust /etc/os-release by itself, at least for
some cycles.

..C..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20130427/a9eaa2c9/attachment.pgp>


More information about the ubuntu-users mailing list