How to identify what linux version is running
Posted on 2007-12-06
I need to include in a setup script for Linux what I am running so that I can install the appropriate libraries.
I need to know if I am running ES 3.0, 4.0 or 5.0.
I am currently using redhat-release file to do that. Apparently this is not a good method because some Linux versions (like CentOS) don't have that file.
I need a better - more general - method to identify what Linux is running on the computer.
I am most interested in redhat releases but if there is something I can use with other distributions that would be great.
The actual bash lines needed would be very much appreciated.