{
    "mode": "man",
    "parameter": "extension-release",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/extension-release/5/json",
    "generated": "2026-10-08T03:20:59Z",
    "synopsis": "/etc/os-release\n/usr/lib/os-release\n/etc/initrd-release\n/usr/lib/extension-release.d/extension-release.IMAGE",
    "sections": {
        "NAME": {
            "content": "os-release, initrd-release, extension-release - Operating system identification\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "/etc/os-release\n\n/usr/lib/os-release\n\n/etc/initrd-release\n\n/usr/lib/extension-release.d/extension-release.IMAGE\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The /etc/os-release and /usr/lib/os-release files contain operating system identification\ndata.\n\nThe format of os-release is a newline-separated list of environment-like shell-compatible\nvariable assignments. It is possible to source the configuration from Bourne shell scripts,\nhowever, beyond mere variable assignments, no shell features are supported (this means\nvariable expansion is explicitly not supported), allowing applications to read the file\nwithout implementing a shell compatible execution engine. Variable assignment values must be\nenclosed in double or single quotes if they include spaces, semicolons or other special\ncharacters outside of A–Z, a–z, 0–9. (Assignments that do not include these special\ncharacters may be enclosed in quotes too, but this is optional.) Shell special characters\n(\"$\", quotes, backslash, backtick) must be escaped with backslashes, following shell style.\nAll strings should be in UTF-8 encoding, and non-printable characters should not be used.\nConcatenation of multiple individually quoted strings is not supported. Lines beginning with\n\"#\" are treated as comments. Blank lines are permitted and ignored.\n\nThe file /etc/os-release takes precedence over /usr/lib/os-release. Applications should check\nfor the former, and exclusively use its data if it exists, and only fall back to\n/usr/lib/os-release if it is missing. Applications should not read data from both files at\nthe same time.  /usr/lib/os-release is the recommended place to store OS release information\nas part of vendor trees.  /etc/os-release should be a relative symlink to\n/usr/lib/os-release, to provide compatibility with applications only looking at /etc/. A\nrelative symlink instead of an absolute symlink is necessary to avoid breaking the link in a\nchroot or initrd environment such as dracut.\n\nos-release contains data that is defined by the operating system vendor and should generally\nnot be changed by the administrator.\n\nAs this file only encodes names and identifiers it should not be localized.\n\nThe /etc/os-release and /usr/lib/os-release files might be symlinks to other files, but it is\nimportant that the file is available from earliest boot on, and hence must be located on the\nroot file system.\n\nos-release must not contain repeating keys. Nevertheless, readers should pick the entries\nlater in the file in case of repeats, similarly to how a shell sourcing the file would. A\nreader may warn about repeating entries.\n\nFor a longer rationale for os-release please refer to the Announcement of /etc/os-release[1].\n",
            "subsections": [
                {
                    "name": "/etc/initrd-release",
                    "content": "In the initrd[2], /etc/initrd-release plays the same role as os-release in the main system.\nAdditionally, the presence of that file means that the system is in the initrd phase.\n/etc/os-release should be symlinked to /etc/initrd-release (or vice versa), so programs that\nonly look for /etc/os-release (as described above) work correctly.\n\nThe rest of this document that talks about os-release should be understood to apply to\ninitrd-release too.\n"
                },
                {
                    "name": "/usr/lib/extension-release.d/extension-release.IMAGE",
                    "content": "/usr/lib/extension-release.d/extension-release.IMAGE plays the same role for extension images\nas os-release for the main system, and follows the syntax and rules as described in the\nPortable Services[3] page. The purpose of this file is to identify the extension and to allow\nthe operating system to verify that the extension image matches the base OS. This is\ntypically implemented by checking that the ID= options match, and either SYSEXTLEVEL= exists\nand matches too, or if it is not present, VERSIONID= exists and matches. This ensures\nABI/API compatibility between the layers and prevents merging of an incompatible image in an\noverlay.\n\nIn order to identify the extension image itself, the same fields defined below can be added\nto the extension-release file with a SYSEXT prefix (to disambiguate from fields used to\nmatch on the base image). E.g.: SYSEXTID=myext, SYSEXTVERSIONID=1.2.3.\n\nIn the extension-release.IMAGE filename, the IMAGE part must exactly match the file name of\nthe containing image with the suffix removed. In case it is not possible to guarantee that an\nimage file name is stable and doesn't change between the build and the deployment phases, it\nis possible to relax this check: if exactly one file whose name matches \"extension-release.*\"\nis present in this directory, and the file is tagged with a user.extension-release.strict\nxattr(7) set to the string \"0\", it will be used instead.\n\nThe rest of this document that talks about os-release should be understood to apply to\nextension-release too.\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "The following OS identifications parameters may be set using os-release:\n",
            "subsections": [
                {
                    "name": "General information identifying the operating system",
                    "content": "NAME=\nA string identifying the operating system, without a version component, and suitable for\npresentation to the user. If not set, a default of \"NAME=Linux\" may be used.\n\nExamples: \"NAME=Fedora\", \"NAME=\"Debian GNU/Linux\"\".\n\nID=\nA lower-case string (no spaces or other characters outside of 0–9, a–z, \".\", \"\" and \"-\")\nidentifying the operating system, excluding any version information and suitable for\nprocessing by scripts or usage in generated filenames. If not set, a default of\n\"ID=linux\" may be used. Note that even though this string may not include characters that\nrequire shell quoting, quoting may nevertheless be used.\n\nExamples: \"ID=fedora\", \"ID=debian\".\n\nIDLIKE=\nA space-separated list of operating system identifiers in the same syntax as the ID=\nsetting. It should list identifiers of operating systems that are closely related to the\nlocal operating system in regards to packaging and programming interfaces, for example\nlisting one or more OS identifiers the local OS is a derivative from. An OS should\ngenerally only list other OS identifiers it itself is a derivative of, and not any OSes\nthat are derived from it, though symmetric relationships are possible. Build scripts and\nsimilar should check this variable if they need to identify the local operating system\nand the value of ID= is not recognized. Operating systems should be listed in order of\nhow closely the local operating system relates to the listed ones, starting with the\nclosest. This field is optional.\n\nExamples: for an operating system with \"ID=centos\", an assignment of \"IDLIKE=\"rhel\nfedora\"\" would be appropriate. For an operating system with \"ID=ubuntu\", an assignment of\n\"IDLIKE=debian\" is appropriate.\n\nPRETTYNAME=\nA pretty operating system name in a format suitable for presentation to the user. May or\nmay not contain a release code name or OS version of some kind, as suitable. If not set,\na default of \"PRETTYNAME=\"Linux\"\" may be used\n\nExample: \"PRETTYNAME=\"Fedora 17 (Beefy Miracle)\"\".\n\nCPENAME=\nA CPE name for the operating system, in URI binding syntax, following the Common Platform\nEnumeration Specification[4] as proposed by the NIST. This field is optional.\n\nExample: \"CPENAME=\"cpe:/o:fedoraproject:fedora:17\"\"\n\nVARIANT=\nA string identifying a specific variant or edition of the operating system suitable for\npresentation to the user. This field may be used to inform the user that the\nconfiguration of this system is subject to a specific divergent set of rules or default\nconfiguration settings. This field is optional and may not be implemented on all systems.\n\nExamples: \"VARIANT=\"Server Edition\"\", \"VARIANT=\"Smart Refrigerator Edition\"\".\n\nNote: this field is for display purposes only. The VARIANTID field should be used for\nmaking programmatic decisions.\n\nAdded in version 220.\n\nVARIANTID=\nA lower-case string (no spaces or other characters outside of 0–9, a–z, \".\", \"\" and\n\"-\"), identifying a specific variant or edition of the operating system. This may be\ninterpreted by other packages in order to determine a divergent default configuration.\nThis field is optional and may not be implemented on all systems.\n\nExamples: \"VARIANTID=server\", \"VARIANTID=embedded\".\n\nAdded in version 220.\n"
                },
                {
                    "name": "Information about the version of the operating system",
                    "content": "VERSION=\nA string identifying the operating system version, excluding any OS name information,\npossibly including a release code name, and suitable for presentation to the user. This\nfield is optional.\n\nExamples: \"VERSION=17\", \"VERSION=\"17 (Beefy Miracle)\"\".\n\nVERSIONID=\nA lower-case string (mostly numeric, no spaces or other characters outside of 0–9, a–z,\n\".\", \"\" and \"-\") identifying the operating system version, excluding any OS name\ninformation or release code name, and suitable for processing by scripts or usage in\ngenerated filenames. This field is optional.\n\nExamples: \"VERSIONID=17\", \"VERSIONID=11.04\".\n\nVERSIONCODENAME=\nA lower-case string (no spaces or other characters outside of 0–9, a–z, \".\", \"\" and \"-\")\nidentifying the operating system release code name, excluding any OS name information or\nrelease version, and suitable for processing by scripts or usage in generated filenames.\nThis field is optional and may not be implemented on all systems.\n\nExamples: \"VERSIONCODENAME=buster\", \"VERSIONCODENAME=xenial\".\n\nAdded in version 231.\n\nBUILDID=\nA string uniquely identifying the system image originally used as the installation base.\nIn most cases, VERSIONID or IMAGEID+IMAGEVERSION are updated when the entire system\nimage is replaced during an update.  BUILDID may be used in distributions where the\noriginal installation image version is important: VERSIONID would change during\nincremental system updates, but BUILDID would not. This field is optional.\n\nExamples: \"BUILDID=\"2013-03-20.3\"\", \"BUILDID=201303203\".\n\nAdded in version 200.\n\nIMAGEID=\nA lower-case string (no spaces or other characters outside of 0–9, a–z, \".\", \"\" and\n\"-\"), identifying a specific image of the operating system. This is supposed to be used\nfor environments where OS images are prepared, built, shipped and updated as\ncomprehensive, consistent OS images. This field is optional and may not be implemented on\nall systems, in particularly not on those that are not managed via images but put\ntogether and updated from individual packages and on the local system.\n\nExamples: \"IMAGEID=vendorx-cashier-system\", \"IMAGEID=netbook-image\".\n\nAdded in version 249.\n\nIMAGEVERSION=\nA lower-case string (mostly numeric, no spaces or other characters outside of 0–9, a–z,\n\".\", \"\" and \"-\") identifying the OS image version. This is supposed to be used together\nwith IMAGEID described above, to discern different versions of the same image.\n\nExamples: \"IMAGEVERSION=33\", \"IMAGEVERSION=47.1rc1\".\n\nAdded in version 249.\n\nTo summarize: if the image updates are built and shipped as comprehensive units,\nIMAGEID+IMAGEVERSION is the best fit. Otherwise, if updates eventually completely replace\npreviously installed contents, as in a typical binary distribution, VERSIONID should be used\nto identify major releases of the operating system.  BUILDID may be used instead or in\naddition to VERSIONID when the original system image version is important.\n"
                },
                {
                    "name": "Presentation information and links",
                    "content": "HOMEURL=, DOCUMENTATIONURL=, SUPPORTURL=, BUGREPORTURL=, PRIVACYPOLICYURL=\nLinks to resources on the Internet related to the operating system.  HOMEURL= should\nrefer to the homepage of the operating system, or alternatively some homepage of the\nspecific version of the operating system.  DOCUMENTATIONURL= should refer to the main\ndocumentation page for this operating system.  SUPPORTURL= should refer to the main\nsupport page for the operating system, if there is any. This is primarily intended for\noperating systems which vendors provide support for.  BUGREPORTURL= should refer to the\nmain bug reporting page for the operating system, if there is any. This is primarily\nintended for operating systems that rely on community QA.  PRIVACYPOLICYURL= should\nrefer to the main privacy policy page for the operating system, if there is any. These\nsettings are optional, and providing only some of these settings is common. These URLs\nare intended to be exposed in \"About this system\" UIs behind links with captions such as\n\"About this Operating System\", \"Obtain Support\", \"Report a Bug\", or \"Privacy Policy\". The\nvalues should be in RFC3986 format[5], and should be \"http:\" or \"https:\" URLs, and\npossibly \"mailto:\" or \"tel:\". Only one URL shall be listed in each setting. If multiple\nresources need to be referenced, it is recommended to provide an online landing page\nlinking all available resources.\n\nExamples: \"HOMEURL=\"https://fedoraproject.org/\"\",\n\"BUGREPORTURL=\"https://bugzilla.redhat.com/\"\".\n\nSUPPORTEND=\nThe date at which support for this version of the OS ends. (What exactly \"lack of\nsupport\" means varies between vendors, but generally users should assume that updates,\nincluding security fixes, will not be provided.) The value is a date in the ISO 8601\nformat \"YYYY-MM-DD\", and specifies the first day on which support is not provided.\n\nFor example, \"SUPPORTEND=2001-01-01\" means that the system was supported until the end\nof the last day of the previous millennium.\n\nAdded in version 252.\n\nLOGO=\nA string, specifying the name of an icon as defined by freedesktop.org Icon Theme\nSpecification[6]. This can be used by graphical applications to display an operating\nsystem's or distributor's logo. This field is optional and may not necessarily be\nimplemented on all systems.\n\nExamples: \"LOGO=fedora-logo\", \"LOGO=distributor-logo-opensuse\"\n\nAdded in version 240.\n\nANSICOLOR=\nA suggested presentation color when showing the OS name on the console. This should be\nspecified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for\nsetting graphical rendition. This field is optional.\n\nExamples: \"ANSICOLOR=\"0;31\"\" for red, \"ANSICOLOR=\"1;34\"\" for light blue, or\n\"ANSICOLOR=\"0;38;2;60;110;180\"\" for Fedora blue.\n\nVENDORNAME=\nThe name of the OS vendor. This is the name of the organization or company which produces\nthe OS. This field is optional.\n\nThis name is intended to be exposed in \"About this system\" UIs or software update UIs\nwhen needed to distinguish the OS vendor from the OS itself. It is intended to be human\nreadable.\n\nExamples: \"VENDORNAME=\"Fedora Project\"\" for Fedora Linux, \"VENDORNAME=\"Canonical\"\" for\nUbuntu.\n\nAdded in version 254.\n\nVENDORURL=\nThe homepage of the OS vendor. This field is optional. The VENDORNAME= field should be\nset if this one is, although clients must be robust against either field not being set.\n\nThe value should be in RFC3986 format[5], and should be \"http:\" or \"https:\" URLs. Only\none URL shall be listed in the setting.\n\nExamples: \"VENDORURL=\"https://fedoraproject.org/\"\",\n\"VENDORURL=\"https://canonical.com/\"\".\n\nAdded in version 254.\n"
                },
                {
                    "name": "Distribution-level defaults and metadata",
                    "content": "DEFAULTHOSTNAME=\nA string specifying the hostname if hostname(5) is not present and no other configuration\nsource specifies the hostname. Must be either a single DNS label (a string composed of\n7-bit ASCII lower-case characters and no spaces or dots, limited to the format allowed\nfor DNS domain name labels), or a sequence of such labels separated by single dots that\nforms a valid DNS FQDN. The hostname must be at most 64 characters, which is a Linux\nlimitation (DNS allows longer names).\n\nSee org.freedesktop.hostname1(5) for a description of how systemd-hostnamed.service(8)\ndetermines the fallback hostname.\n\nAdded in version 248.\n\nARCHITECTURE=\nA string that specifies which CPU architecture the userspace binaries require. The\narchitecture identifiers are the same as for ConditionArchitecture= described in\nsystemd.unit(5). The field is optional and should only be used when just single\narchitecture is supported. It may provide redundant information when used in a GPT\npartition with a GUID type that already encodes the architecture. If this is not the\ncase, the architecture should be specified in e.g., an extension image, to prevent an\nincompatible host from loading it.\n\nAdded in version 252.\n\nSYSEXTLEVEL=\nA lower-case string (mostly numeric, no spaces or other characters outside of 0–9, a–z,\n\".\", \"\" and \"-\") identifying the operating system extensions support level, to indicate\nwhich extension images are supported. See\n/usr/lib/extension-release.d/extension-release.IMAGE, initrd[2] and systemd-sysext(8))\nfor more information.\n\nExamples: \"SYSEXTLEVEL=2\", \"SYSEXTLEVEL=15.14\".\n\nAdded in version 248.\n\nCONFEXTLEVEL=\nSemantically the same as SYSEXTLEVEL= but for confext images. See\n/etc/extension-release.d/extension-release.IMAGE for more information.\n\nExamples: \"CONFEXTLEVEL=2\", \"CONFEXTLEVEL=15.14\".\n\nAdded in version 254.\n\nSYSEXTSCOPE=\nTakes a space-separated list of one or more of the strings \"system\", \"initrd\" and\n\"portable\". This field is only supported in extension-release.d/ files and indicates what\nenvironments the system extension is applicable to: i.e. to regular systems, to initrds,\nor to portable service images. If unspecified, \"SYSEXTSCOPE=system portable\" is implied,\ni.e. any system extension without this field is applicable to regular systems and to\nportable service environments, but not to initrd environments.\n\nAdded in version 250.\n\nCONFEXTSCOPE=\nSemantically the same as SYSEXTSCOPE= but for confext images.\n\nAdded in version 254.\n\nPORTABLEPREFIXES=\nTakes a space-separated list of one or more valid prefix match strings for the Portable\nServices[3] logic. This field serves two purposes: it is informational, identifying\nportable service images as such (and thus allowing them to be distinguished from other OS\nimages, such as bootable system images). It is also used when a portable service image is\nattached: the specified or implied portable service prefix is checked against the list\nspecified here, to enforce restrictions how images may be attached to a system.\n\nAdded in version 250.\n"
                },
                {
                    "name": "Notes",
                    "content": "If you are using this file to determine the OS or a specific version of it, use the ID and\nVERSIONID fields, possibly with IDLIKE as fallback for ID. When looking for an OS\nidentification string for presentation to the user use the PRETTYNAME field.\n\nNote that operating system vendors may choose not to provide version information, for example\nto accommodate for rolling releases. In this case, VERSION and VERSIONID may be unset.\nApplications should not rely on these fields to be set.\n\nOperating system vendors may extend the file format and introduce new fields. It is highly\nrecommended to prefix new fields with an OS specific name in order to avoid name clashes.\nApplications reading this file must ignore unknown fields.\n\nExample: \"DEBIANBTS=\"debbugs://bugs.debian.org/\"\".\n\nContainer and sandbox runtime managers may make the host's identification data available to\napplications by providing the host's /etc/os-release (if available, otherwise\n/usr/lib/os-release as a fallback) as /run/host/os-release.\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "Example 1. os-release file for Fedora Workstation",
                    "content": "NAME=Fedora\nVERSION=\"32 (Workstation Edition)\"\nID=fedora\nVERSIONID=32\nPRETTYNAME=\"Fedora 32 (Workstation Edition)\"\nANSICOLOR=\"0;38;2;60;110;180\"\nLOGO=fedora-logo-icon\nCPENAME=\"cpe:/o:fedoraproject:fedora:32\"\nHOMEURL=\"https://fedoraproject.org/\"\nDOCUMENTATIONURL=\"https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/\"\nSUPPORTURL=\"https://fedoraproject.org/wiki/Communicatingandgettinghelp\"\nBUGREPORTURL=\"https://bugzilla.redhat.com/\"\nREDHATBUGZILLAPRODUCT=\"Fedora\"\nREDHATBUGZILLAPRODUCTVERSION=32\nREDHATSUPPORTPRODUCT=\"Fedora\"\nREDHATSUPPORTPRODUCTVERSION=32\nPRIVACYPOLICYURL=\"https://fedoraproject.org/wiki/Legal:PrivacyPolicy\"\nVARIANT=\"Workstation Edition\"\nVARIANTID=workstation\n"
                },
                {
                    "name": "Example 2. extension-release file for an extension for Fedora Workstation 32",
                    "content": "ID=fedora\nVERSIONID=32\n"
                },
                {
                    "name": "Example 3. Reading os-release in sh(1)",
                    "content": "#!/bin/sh -eu\n# SPDX-License-Identifier: MIT-0\n\ntest -e /etc/os-release && osrelease='/etc/os-release' || osrelease='/usr/lib/os-release'\n. \"${osrelease}\"\n\necho \"Running on ${PRETTYNAME:-Linux}\"\n\nif [ \"${ID:-linux}\" = \"debian\" ] || [ \"${IDLIKE#*debian*}\" != \"${IDLIKE}\" ]; then\necho \"Looks like Debian!\"\nfi\n"
                },
                {
                    "name": "Example 4. Reading os-release in python(1) (versions >= 3.10)",
                    "content": "#!/usr/bin/python\n# SPDX-License-Identifier: MIT-0\n\nimport platform\nosrelease = platform.freedesktoposrelease()\n\nprettyname = osrelease.get('PRETTYNAME', 'Linux')\nprint(f'Running on {prettyname!r}')\n\nif 'fedora' in [osrelease.get('ID', 'linux'),\n*osrelease.get('IDLIKE', '').split()]:\nprint('Looks like Fedora!')\n\nSee docs for platform.freedesktoposrelease[7] for more details.\n"
                },
                {
                    "name": "Example 5. Reading os-release in python(1) (any version)",
                    "content": "#!/usr/bin/python\n# SPDX-License-Identifier: MIT-0\n\nimport ast\nimport re\nimport sys\n\ndef readosrelease():\ntry:\nfilename = '/etc/os-release'\nf = open(filename)\nexcept FileNotFoundError:\nfilename = '/usr/lib/os-release'\nf = open(filename)\n\nfor linenumber, line in enumerate(f, start=1):\nline = line.rstrip()\nif not line or line.startswith('#'):\ncontinue\nm = re.match(r'([A-Z][A-Z0-9]+)=(.*)', line)\nif m:\nname, val = m.groups()\nif val and val[0] in '\"\\'':\nval = ast.literaleval(val)\nyield name, val\nelse:\nprint(f'{filename}:{linenumber}: bad line {line!r}',\nfile=sys.stderr)\n\nosrelease = dict(readosrelease())\n\nprettyname = osrelease.get('PRETTYNAME', 'Linux')\nprint(f'Running on {prettyname!r}')\n\nif 'debian' in [osrelease.get('ID', 'linux'),\n*osrelease.get('IDLIKE', '').split()]:\nprint('Looks like Debian!')\n\nNote that the above version that uses the built-in implementation is preferred in most cases,\nand the open-coded version here is provided for reference.\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "systemd(1), lsbrelease(1), hostname(5), machine-id(5), machine-info(5)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Announcement of /etc/os-release\nhttps://0pointer.de/blog/projects/os-release\n\n2. initrd\nhttps://docs.kernel.org/admin-guide/initrd.html\n\n3. Portable Services\nhttps://systemd.io/PORTABLESERVICES\n\n4. Common Platform Enumeration Specification\nhttp://scap.nist.gov/specifications/cpe/\n\n5. RFC3986 format\nhttps://tools.ietf.org/html/rfc3986\n\n6. freedesktop.org Icon Theme Specification\nhttps://standards.freedesktop.org/icon-theme-spec/latest\n\n7.\n\nplatform.freedesktoposrelease\nhttps://docs.python.org/3/library/platform.html#platform.freedesktoposrelease\n\nsystemd 255                                                                            OS-RELEASE(5)",
            "subsections": []
        }
    },
    "summary": "os-release, initrd-release, extension-release - Operating system identification",
    "flags": [],
    "examples": [
        "NAME=Fedora",
        "VERSION=\"32 (Workstation Edition)\"",
        "ID=fedora",
        "VERSIONID=32",
        "PRETTYNAME=\"Fedora 32 (Workstation Edition)\"",
        "ANSICOLOR=\"0;38;2;60;110;180\"",
        "LOGO=fedora-logo-icon",
        "CPENAME=\"cpe:/o:fedoraproject:fedora:32\"",
        "HOMEURL=\"https://fedoraproject.org/\"",
        "DOCUMENTATIONURL=\"https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/\"",
        "SUPPORTURL=\"https://fedoraproject.org/wiki/Communicatingandgettinghelp\"",
        "BUGREPORTURL=\"https://bugzilla.redhat.com/\"",
        "REDHATBUGZILLAPRODUCT=\"Fedora\"",
        "REDHATBUGZILLAPRODUCTVERSION=32",
        "REDHATSUPPORTPRODUCT=\"Fedora\"",
        "REDHATSUPPORTPRODUCTVERSION=32",
        "PRIVACYPOLICYURL=\"https://fedoraproject.org/wiki/Legal:PrivacyPolicy\"",
        "VARIANT=\"Workstation Edition\"",
        "VARIANTID=workstation",
        "ID=fedora",
        "VERSIONID=32",
        "#!/bin/sh -eu",
        "# SPDX-License-Identifier: MIT-0",
        "test -e /etc/os-release && osrelease='/etc/os-release' || osrelease='/usr/lib/os-release'",
        ". \"${osrelease}\"",
        "echo \"Running on ${PRETTYNAME:-Linux}\"",
        "if [ \"${ID:-linux}\" = \"debian\" ] || [ \"${IDLIKE#*debian*}\" != \"${IDLIKE}\" ]; then",
        "echo \"Looks like Debian!\"",
        "fi",
        "#!/usr/bin/python",
        "# SPDX-License-Identifier: MIT-0",
        "import platform",
        "osrelease = platform.freedesktoposrelease()",
        "prettyname = osrelease.get('PRETTYNAME', 'Linux')",
        "print(f'Running on {prettyname!r}')",
        "if 'fedora' in [osrelease.get('ID', 'linux'),",
        "*osrelease.get('IDLIKE', '').split()]:",
        "print('Looks like Fedora!')",
        "See docs for platform.freedesktoposrelease[7] for more details.",
        "#!/usr/bin/python",
        "# SPDX-License-Identifier: MIT-0",
        "import ast",
        "import re",
        "import sys",
        "def readosrelease():",
        "try:",
        "filename = '/etc/os-release'",
        "f = open(filename)",
        "except FileNotFoundError:",
        "filename = '/usr/lib/os-release'",
        "f = open(filename)",
        "for linenumber, line in enumerate(f, start=1):",
        "line = line.rstrip()",
        "if not line or line.startswith('#'):",
        "continue",
        "m = re.match(r'([A-Z][A-Z0-9]+)=(.*)', line)",
        "if m:",
        "name, val = m.groups()",
        "if val and val[0] in '\"\\'':",
        "val = ast.literaleval(val)",
        "yield name, val",
        "else:",
        "print(f'{filename}:{linenumber}: bad line {line!r}',",
        "file=sys.stderr)",
        "osrelease = dict(readosrelease())",
        "prettyname = osrelease.get('PRETTYNAME', 'Linux')",
        "print(f'Running on {prettyname!r}')",
        "if 'debian' in [osrelease.get('ID', 'linux'),",
        "*osrelease.get('IDLIKE', '').split()]:",
        "print('Looks like Debian!')",
        "Note that the above version that uses the built-in implementation is preferred in most cases,",
        "and the open-coded version here is provided for reference."
    ],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "lsbrelease",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lsbrelease/1/json"
        },
        {
            "name": "hostname",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/hostname/5/json"
        },
        {
            "name": "machine-id",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/machine-id/5/json"
        },
        {
            "name": "machine-info",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/machine-info/5/json"
        }
    ]
}