Sometimes I need to access some servers running Linux (or maybe another Unix-like SO), but I don\'t know how to verify which distribution is in use on the server (there are
In my .cshrc I have
setenv DISTRO `sed -e 's/.*(//' -e 's/)).*//' /proc/version`
For ksh / Bash users, I presume it translates to
export DISTRO=`sed -e 's/.*(//' -e 's/)).*//' /proc/version`
and of course this may not work for your favorite distribution. (I have had issues with Oracle's Unbreakable Linux giving something similar to Redhat, but it was good enough for my purposes.)
Update August 2016 I have not used Linux in this way for a while (2008 is a long time ago). It seems that this does not work anymore for the systems I now have.