LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-10-2010, 06:38 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Rep: Reputation: 33
A question about checking LINUX version


We got a new machine on which a LINUX is installed. I check the LINUX version with 3 different command but get 3 different results. WHich one is the correct one?

This command shows the version is RHEL 4
Code:
[root@s003ap03n-test ~]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 8)

This command shows the version is Red Hat 3
Code:
[root@s003ap03n-test ~]# cat /proc/version
Linux version 2.6.9-78.ELsmp (brewbuilder@ls20-bc2-14.build.redhat.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-10)) #1 SMP Wed Jul 9 15:46:26 EDT 2008

This command shows no version but the bit system
Code:
[root@s003ap03n-test ~]# uname -a
Linux s003ap03n-test.proactiv.de 2.6.9-78.ELsmp #1 SMP Wed Jul 9 15:46:26 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
What version is installed?
 
Old 06-10-2010, 06:57 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
It's RHEL 4, the second command states that the gcc version is 3.4.6 not the RHEL version, 2.6.9-78 is the kernel version, architecture is x86_64.
 
1 members found this post helpful.
Old 06-10-2010, 06:57 AM   #3
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
I'm no RedHat guru, but based on the given criteria, it appears to be RHEL4 as indicated in the first output you gave. A quick Google also seems to indicate that RHEL4 included some 2.6.9.xxx kernels, so that seems reasonably likely that RHEL4 is right.

The next 2 commands you did are both mainly used to determine what kernel is currently running, not necessarily which linux distro it is. Kernel names can contain names/strings ahat can be arbitrary and meaningless, but the version number (2.6.9) should be correct. The 3.4.6 is referring to the GCC Compiler version which was/is installed/used in the machine and to build the kernel.

Sasha
 
1 members found this post helpful.
Old 06-10-2010, 06:59 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296Reputation: 1296
Hello,

The first command shows you that you have RedHat Enterprise Linux 4, release 8 installed. That's your 'distro', the brand, like there are Debian, Ubuntu and others.

The second one shows you what kernel you have installed (2.6.9-78) and the last command shows you the same but with info like hostname included.

I imagine that at some point in time there has been a partial update/upgrade performed that didn't update the kernel version, for whatever reason.

You say it's a new machine but yet it has an old(ish) version of RedHat installed, any idea how that is? Did you buy it second hand from a company (German?)?

Kind regards,

Eric

PS: Missed the GCC part, thanks for pointing that out (need to get some sleep one of these days )

Last edited by EricTRA; 06-10-2010 at 07:00 AM.
 
Old 06-10-2010, 07:14 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

There is also:
Code:
lsb_release -a
that will show you the RHEL release version

Regards
 
Old 06-10-2010, 08:00 AM   #6
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 537

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by bathory View Post
Hi,

There is also:
Code:
lsb_release -a
that will show you the RHEL release version

Regards
This command doesn't run by me.
 
Old 06-10-2010, 08:03 AM   #7
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552Reputation: 552
How doesn't it run? As in, the command does not exist on the machine, or is it requiring higher privileges? If the latter, run it as root.

Sasha
 
Old 06-10-2010, 08:42 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,590

Rep: Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799Reputation: 1799
Hi,

AFAIK lsb_release comes by default with RHEL. Chances are that you have uninstalled it.
Run:
Code:
rpm -qa|grep lsb
to see if that's the case.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
version checking with except cyki Programming 6 02-06-2009 04:33 AM
checking version of OS Sailesh Linux - Software 23 01-06-2007 01:52 AM
Newbie Question - Checking Kernel Version squall1986 Fedora 3 11-14-2006 03:28 PM
checking for GLIB - version >= 2.4.0... no guarriman Fedora 1 07-19-2005 04:53 AM
Checking Version enik256 Linux - Newbie 4 01-28-2005 01:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration