Discovering Linux ‘Distro’ Facts

I am building out parts of the Citihub web site monitoring solution using Zabbix and have decided that I need a User Procedure to report certain distro facts since we seem to be using whatever OS the solution author feels like. (We have several Linux distros within the web site. Zabbix comes with a number of agents which report certain static facts about the systems being monitored, and these have been the inspiration for this piece of work.

I have written a program (shell script) that browses and parses /etc/*-release. It has been tested for RHES, SUSE, Fedora and Ubuntu 10. It ends with status 0 if it works OK and 1 for a universal error i.e. if it cannot detect and parse the *-release files. It replies status 10 if neither lsb-release nor system-release files are present, and status 255 if it is not Linux. I put this program in /usr/local/bin.

This page, called Find out my Linux distribution name and version at was very useful and documented the use of the /etc/*-release files.

I wrote a script called showdistro which works on a bunch of distros with varying verboseness.



Related Posts

  • File Transfer I need to revise file transfer over TCP/IP. This article consists of links on […]
  • Ubuntu 13.10 I am installing this on the Mac under Virtual Box. This snip is about Ubuntu. The […]
  • System V init scripts I really like Ubuntu's system V initialisation scripts and features. This is now based […]
  • Centos 6.x I downloaded this from The […]
  • RCS Revision Control System, one of the grand daddies of them all. I still use it because […]

Leave a Reply

Your email address will not be published. Required fields are marked *