LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   centOS reporting two different versions (https://www.linuxquestions.org/questions/linux-newbie-8/centos-reporting-two-different-versions-4175455962/)

digity 03-28-2013 06:21 PM

centOS reporting two different versions
 
At the console it says centOS 5.7, but "lsb_release -a" returns 5.9. What gives? Which is the correct version and how could I verify that so I know for sure?

suicidaleggroll 03-28-2013 06:34 PM

At what console? You mean your command prompt? What is the output of
Code:

echo $PS1

chrism01 03-28-2013 06:56 PM

Also try
Code:

cat /etc/centos-release
unless that's what you meant by 'console'

digity 03-28-2013 08:55 PM

The console meaning that old text based interface you get when physically at the computer and monitor - when the machine restarted it dropped out of the windows manager (Gnome) and into the text based interface for about ten seconds before actually rebooting the machine. During those ten seconds that's when I saw centOS 5.7 above the login prompt.

echo $PS1
Code:

[\u@\h \W]\$

cat /etc/centos-release
Code:

cat: /etc/centos-release: No such file or directory

spiky0011 03-29-2013 02:15 AM

Try

Code:

cat /etc/system-release

shivaa 03-29-2013 03:26 AM

Can you try:
Code:

~$ cat /etc/issue
And how console is displaying centOS 5.7? Do you see it in login banner when you open a new terminal? If yes, then banner could be set wrongly.

digity 03-29-2013 12:00 PM

cat /etc/system-release
Code:

cat: /etc/system-release: No such file or directory

cat /etc/issue
Code:

CentOS release 5.9 (Final)
Kernel \r on an \m

So is it safe to say this is indeed 5.9? If so, I have one quick question... would centOS have auto upgraded itself to 5.9 in January when it was released or did someone have to manually upgrade it to 5.9?

shivaa 03-29-2013 12:46 PM

Yes, it's indeed 5.9. You will need to upgrade it manualy, it will not be upgraded automatically.

rknichols 03-29-2013 05:33 PM

Quote:

Originally Posted by shivaa (Post 4921165)
Yes, it's indeed 5.9. You will need to upgrade it manualy, it will not be upgraded automatically.

That is incorrect. CentOS will automatically upgrade to the latest point release unless you have edited the files in /etc/yum.repos.d to lock it to a specific point release. The .repo files that come with the installation just request the updates for version "5", and on the servers, "5" is just a symlink to the latest point release.

If you did want to stay locked at a particular point release, you would have to edit the .repo file and change all instances of "$releasever" to "5.7", or whatever point release you wanted. Doing so is inadvisable because you would get no further security updates once a later point release came out. If you wanted to run on a particular point release, you would be better off using Scientific Linux, which does continue to offer security updates for older point releases (and does not, by default, automatically update to newer point releases).


All times are GMT -5. The time now is 01:47 AM.