Determine Redhat Linux Version

Satish picture Satish · Mar 1, 2013 · Viewed 52.6k times · Source

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.

Answer

Tim picture Tim · Jul 29, 2013

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