Link to home
Start Free TrialLog in
Avatar of Anthony Lucia
Anthony Lucia

asked on

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
Avatar of Seth Simmons
Seth Simmons
Flag of United States of America image

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
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also cat /etc/redhat*
Avatar of Tintin
Tintin

In most cases

cat /etc/*release
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'