Am I in RHEL or OEL?

OK, first time accessing a client, and you have this question?

# RHEL:

[grepora-rhel-server]$ rpm -qf /etc/redhat-release 
redhat-release-server-6Server-6.9.0.4.el6.x86_64

# OEL:

[grepora-oel-server]$ rpm -qf /etc/redhat-release
enterprise-release-5-0.0.2

You may also have some other options like:

[grepora-fedora-server]$ rpm -qf /etc/redhat-release 
fedora-release-20-3.noarch

Hope you enjoy it!
Cheers!

3 Comments

  1. IWKABH

    Hey Matheus. you can also use lsb_release as below
    [root@rac1 Desktop]# lsb_release -a
    LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
    Distributor ID: OracleServer
    Description: Oracle Linux Server release 6.9
    Release: 6.9
    Codename: n/a
    [root@rac1 Desktop]#

    It works on RHEL as well

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.