I am trying to determine what flavor of linux server is running. I am not trying to determine the kernel version - but rater the distributor.
gcc is installed, and in the version output, it says RedHat
# gcc --version gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-11)
Does this mean I can safely assume my server is a RedHat server. Is there a better - 100% bulletproof method to find this out? Also for other linux flavors - not just this server?
Edit: contents of
/etc/ in case it helps - but I would like a solution that works for other versions of linux too.
# ls /etc/ ./ backupmxhosts domainusers host.conf localdomains mailips pam.d/ relayhosts shadow trustedmailhosts ../ bashrc* exim.conf inputrc localtime man.config passwd resolv.conf skipsmtpcheckhosts userdomains DIR_COLORS cron.deny exim.pl ld.so.cache lynx.cfg mtab profile secondarymx spammeripblocks vimrc aliases demodomains exim.pl.local* ld.so.conf mail/ my.cnf profile.d/ senderverifybypasshosts sudoers antivirus.exim demouids group localaliases mailhelo nsswitch.conf protocols services termcap
I have no
# ls /etc*release; ls /etc/*version /bin/ls: /etc/*release: No such file or directory /bin/ls: /etc/*version: No such file or directory
I tried LSB
# lsb_release -a LSB Version: Distributor ID: n/a Description: (none) Release: n/a Codename: n/a
Also - I guess I am inside a
chroot jail (not really sure what that is) which could likely be the cause for this issue.
I think this does it for me. I think I can safely assume I am using cent-os.
# cat /proc/version Linux version 2.6.9-103.plus.c4smp (email@example.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-11)) #1 SMP Wed Dec 21 16:17:23 EST 2011