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.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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With