Issue
How do I determine which RedHat
Linux version I am running?
Here's what I've read:
/etc/redhat-release
file contains the version, but anybody can tamper with that file.- people say
uname
command, but you can install any kernel on Redhat.
If I am running redhat 5.1 and someone upgrade it with 5.2 or 5.x, what determines the version of RedHat?
even lsb_release -a
read /etc/redhat-release file.
Solution
If "anybody" has root access to your machine to either change /etc/redhat-release or install an alternate kernel you're most probably in bigger trouble than determining the redhat version of your system.
Just use the value pointed out by /etc/redhat-release or even better in terms of portability use the output of lsb_release as this is exactly the purpose they were made for.
With "anybody" being able to do anything with your system there is no other chance at all.
Answered By - mikyra