Correct way to determine distro version in bash?

Joseph Hall perlhoser at
Mon Apr 8 16:46:46 MDT 2013

On Mon, Apr 8, 2013 at 4:30 PM, S. Dale Morrey <sdalemorrey at> wrote:
> This got me thinking, is there a correct way to check this sort of thing?
> Something that's going to be consistent, at least across direct derivations
> such as RHEL & CentOS?

If there's one thing that I've discovered, there is nothing that is
absolutely reliable across every distro. However, looking at
/etc/*release will get you close.

"In order to create, you have to have the willingness, the desire to
be challenged, to be learning." -- Ferran Adria (speaking at Harvard,

More information about the PLUG mailing list