Skip to content

Instantly share code, notes, and snippets.

@gjedeer
Last active December 22, 2015 19:49
Show Gist options
  • Save gjedeer/6522293 to your computer and use it in GitHub Desktop.
Save gjedeer/6522293 to your computer and use it in GitHub Desktop.
One-liner to detect Linux distro and version
# One-liner to detect Linux distro and version
cat /etc/issue;uname -a;if [ -f /etc/lsb-release ]; then echo "Ubuntu"; cat /etc/lsb-release; fi;if [ -f /etc/debian_version ]; then echo "Debian"; cat /etc/debian_version; fi;if [ -f /etc/redhat-release ]; then echo "RHEL"; cat /etc/redhat-release; fi;if [ -f /etc/SuSE-release ]; then echo "SuSE"; cat /etc/SuSE-release; fi;
# One-liner to detect Linux distro and version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment