Finding the OS name/version of the linux server

Hi EE,

Trying to find the OS name of a very old version of Linux the two commands I have run are below:

uname -r

uname -a
Linux uch-crhotp-01 2.6.32-358.el6.x86_64

Any other commands I could run that could give the OS name and version?

Any assistance is appreciated.

Thank you.
ZackGeneral IT Goto GuyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.



lsb_release -a

Open in new window

That works for me on Ubuntu 16.04LTS, but I do not know how far back it would have worked.

Dr. KlahnPrincipal Software EngineerCommented:
Look in /etc/motd.  Some operating systems put a default message in there identifying the distribution and the version.

If the system is Debian, Ubuntu or Debian-based, then the commands "apt" or "dpkg" should produce a response when invoked by root.

Under a Redhat or Redhat-based distribution, "rpm" should produce a response when invoked by root.
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You're running some RedHat derivative so you'll look for one of these files.


Open in new window

You system is so old, likely will be the 2nd file.

Here's the catch... RedHat derivatives tend to be very inconsistent about how this is handled... especially on very old versions...

If neither of the files above exists, then look in /etc for something about the OS.

If you can't find a release file, you'll have to resort to rpm to dump the exact Kernel version (like you did with uname) + scour through the RedHat + CentOS + Fedora Wikipedia history to attempt determining your version.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Robert LemMrCommented:
This works fine for all Linux environment:

cat /etc/*-release
Seth SimmonsSr. Systems AdministratorCommented:
Trying to find the OS name of a very old version of Linux the two commands I have run are below:

you are running red hat 6.4

Red Hat Enterprise Linux Release Dates

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ZackGeneral IT Goto GuyAuthor Commented:
Hi, guys thank you very much for your help.
nociSoftware EngineerCommented:
Or CentOS 6 or any derivative thereof.  in 64bit mode.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.