• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

Linux and Linux versions

I have been given access to what was called a "Linux server"

The problem is I am not told if its CeentOS, Red Hat, etc

Is there a simple command that will tell me the version of Linux, no matter what the version of Linux you are running?

Thanks
0
Anthony Lucia
Asked:
Anthony Lucia
1 Solution
 
Seth SimmonsSr. Systems AdministratorCommented:
uname -a will give you the kernel version and architecture; can probably guess from the version the distribution
if it's a red hat or variant, you can do cat /etc/redhat-release and it will show the OS version
0
 
woolmilkporcCommented:
cat /proc/version

could also help.

(Not only) on Ubuntu you can try

cat /etc/issue

if you didn't modify the content of this file too much, that is.
0
 
Nick UpsonPrincipal Operations EngineerCommented:
also cat /etc/redhat*
0
 
TintinCommented:
In most cases

cat /etc/*release
0
 
Saravanan PalanisamySystems EngineerCommented:
In redhat & centos, Use this command dmesg | sed -n '3p'
It will show Linux distro, version details as well as kernel version.
In Ubuntu & Debian, Use this command dmesg | sed -n '4p'
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now