{"id":802,"date":"2011-05-12T14:43:54","date_gmt":"2011-05-12T14:43:54","guid":{"rendered":"http:\/\/wiki.davelevy.info\/?p=802"},"modified":"2021-09-07T10:47:44","modified_gmt":"2021-09-07T10:47:44","slug":"discovering-linux-distro-facts","status":"publish","type":"post","link":"https:\/\/davelevy.info\/wiki\/discovering-linux-distro-facts\/","title":{"rendered":"Discovering Linux &#8216;Distro&#8217; Facts"},"content":{"rendered":"<p>This article documents my version of <code>whatdistro<\/code>,\u00a0\u00a0I needed a User Procedure to report certain distro facts.\u00a0 I wrote a script called <a href=\"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2011\/05\/showdistro.txt\">showdistro<\/a> which works on a bunch of distros with varying verboseness.\u00a0This is now implemented as a function on github : <a href=\"https:\/\/github.com\/dfl1955\/ubuntu-tools\/blob\/master\/dfl1955_functions\">https:\/\/github.com\/dfl1955\/ubuntu-tools\/blob\/master\/dfl1955_functions<\/a> implemented as <code>whatdistro<\/code>.<!--more--><\/p>\n<p>I originally did this because I was building out parts of the Citihub web site monitoring solution using Zabbix and 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.<\/p>\n<p>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.<\/p>\n<p>This page, called\u00a0Find out my Linux distribution name and version at\u00a0http:\/\/www.cyberciti.biz was very useful and documented the use of the \/etc\/*-release files.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article documents my version of whatdistro,\u00a0\u00a0I needed a User Procedure to report certain distro facts.\u00a0 I wrote a script called showdistro which works on a bunch of distros with varying verboseness.\u00a0This is now implemented as a function on github : https:\/\/github.com\/dfl1955\/ubuntu-tools\/blob\/master\/dfl1955_functions implemented as whatdistro.<\/p>\n","protected":false},"author":1,"featured_media":4066,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_share_on_mastodon":"0"},"categories":[8,3],"tags":[226,54,916,911],"class_list":["post-802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-technology","tag-distro","tag-howto","tag-linux","tag-technology"],"share_on_mastodon":{"url":"","error":""},"jetpack_featured_media_url":"https:\/\/davelevy.info\/wiki\/wp-content\/uploads\/2009\/07\/html-from-makeuseof_com-w650c.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/comments?post=802"}],"version-history":[{"count":5,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/802\/revisions"}],"predecessor-version":[{"id":5979,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/posts\/802\/revisions\/5979"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media\/4066"}],"wp:attachment":[{"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/media?parent=802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/categories?post=802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/davelevy.info\/wiki\/wp-json\/wp\/v2\/tags?post=802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}