Determine Redhat Linux Version

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.


Try this command:

rpm -qa | grep release

for instance on my machine I get this

redhat-release-workstation-6Workstation-6.4.0.4.el6.x86_64