Scenario: You been given access to a server and you don’t know if it’s a pure RedHat, CentOS or Oracle Enterprise Linux server.
We all know how to query the version of the Linux OS using the following :
> uname -a
> cat /etc/redhat-release
But these don’t necessarily differentiate between a pure RedHat O/S and the downstream Linux distributions such as CentOS or Oracle Enterprise Linux.
As well as the above, you can query what’s been installed through RPM:
> rpm -qa | grep oraclelinux
> rpm -qa | grep centos
Any output in one or the other will confirm an OEL or CentOS distribution.