Determine whether we on Centos/RedHat or on SuSE linux
Determine whether we on Centos/RedHat or on SuSE linux
if which yum &>/dev/null; then
# redhat-based
echo redhat-based
elif which zypper &>/dev/null; then
#SLES
echo SLES
elif which rpm &>/dev/null; then
echo something with RPM
else
# something other
echo other
fi
Written by Roman Rader
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#