Reliable way to determine native packaging system

Tim ignored_mailbox at
Sun Mar 17 07:46:15 UTC 2013

>> In the last few days, I had read a page discussing a more universal
>> single /etc/release file, that would use the one filename for all
>> distros, and have parameters inside it that were specific to the
>> particular release.

T.C. Hollingsworth:
> That would be /etc/os-release:

Yes, that was it.  Sounds just like what they original poster wants, but
probably hasn't been implemented enough for them to use.

But, to my mind, if I was having to support numerous OSs, rather than
trying to poll package managers databases, and make guesses about which
distro it was (and release version, etc), it'd be far easier to find out
what release file they each use, and search for them (in the absence of
a universal release file).  It'd only be one file per release, and
surely each release file would be unique enough to identify it clearly.

[tim at localhost ~]$ uname -r

Don't send private replies to my address, the mailbox is ignored.  I
read messages from the public lists.

More information about the users mailing list