Hi
I am looking for some command which can tell if system is RHEL or Centos. Like getconf LONG_BIT gives whether system is 32 bit or 64 bit.
I need it to change the steps in makefile for c code.
Thanks
how to find out RHEL or Centos from makefile
Re: how to find out RHEL or Centos from makefile
Do you to tell apart RHEL from CentOS or to tell if the system you are building on is either one?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 2
- Joined: 2014/08/22 20:06:41
Re: how to find out RHEL or Centos from makefile
I want to do different things for RHEL and Centos. So want to know if current OS is CentOS or Rhel.
i know there is a file /etc/centos-release but is there anything cleaner then checking for this file.
I want to to tell apart RHEL from CentOS.
i know there is a file /etc/centos-release but is there anything cleaner then checking for this file.
I want to to tell apart RHEL from CentOS.
Re: how to find out RHEL or Centos from makefile
Checking /etc/os-release might be marginally cleaner.
Re: how to find out RHEL or Centos from makefile
Why would you need to tell them apart? They are to all intents and purposes (and by design) identical!
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: how to find out RHEL or Centos from makefile
Thats a good bet for this. Oracle reports as RHEL though.avij wrote:Checking /etc/os-release might be marginally cleaner.
CentOS Workstation
Code: Select all
[andrew@big-red ~]$ cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[andrew@big-red ~]$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
[andrew@big-red ~]$
Code: Select all
[andrew@vm0 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.5 (Santiago)
[andrew@vm0 ~]$ cat /etc/os-release
cat: /etc/os-release: No such file or directory
[andrew@vm0 ~]$