17The ``distro`` package (``distro`` stands for Linux Distribution) provides
18information about the Linux distribution it runs on, such as a reliable
19machine-readable distro ID, or version information.
21It is the recommended replacement for Python's original
22:py:func:`platform.linux_distribution` function, but it provides much more
23functionality. An alternative implementation became necessary because Python
243.5 deprecated this function, and Python 3.8 removed it altogether. Its
25predecessor function :py:func:`platform.dist` was already deprecated since
26Python 2.6 and removed in Python 3.8. Still, there are many cases in which
27access to OS distribution information is needed. See `Python issue 1322
28<https://bugs.python.org/issue1322>`_ for more information.
53 from typing
import TypedDict
70 version_parts: VersionDict
77_OS_RELEASE_BASENAME =
"os-release"
88 "opensuse-leap":
"opensuse",
99 "enterpriseenterpriseas":
"oracle",
100 "enterpriseenterpriseserver":
"oracle",
101 "redhatenterpriseworkstation":
"rhel",
102 "redhatenterpriseserver":
"rhel",
103 "redhatenterprisecomputenode":
"rhel",
113NORMALIZED_DISTRO_ID = {
119 r"(?:[^)]*\)(.*)\()? *(?:STL )?([\d.+\-a-z]*\d) *(?:esaeler *)?(.+)"
123_DISTRO_RELEASE_BASENAME_PATTERN =
re.compile(
r"(\w+)[-_](release|version)$")
126_DISTRO_RELEASE_BASENAMES = [
136 "mandrivalinux-release",
146_DISTRO_RELEASE_IGNORE_BASENAMES = (
150 _OS_RELEASE_BASENAME,
157def linux_distribution(full_distribution_name: bool =
True) -> Tuple[str, str, str]:
159 .. deprecated:: 1.6.0
161 :func:`distro.linux_distribution()` is deprecated. It should only be
162 used as a compatibility shim with Python's
163 :py:func:`platform.linux_distribution()`. Please use :func:`distro.id`,
164 :func:`distro.version` and :func:`distro.name` instead.
166 Return information about the current OS distribution as a tuple
167 ``(id_name, version, codename)`` with items as follows:
169 * ``id_name``: If *full_distribution_name* is false, the result of
170 :func:`distro.id`. Otherwise, the result of :func:`distro.name`.
172 * ``version``: The result of :func:`distro.version`.
174 * ``codename``: The extra item (usually in parentheses) after the
175 os-release version number, or the result of :func:`distro.codename`.
177 The interface of this function is compatible with the original
178 :py:func:`platform.linux_distribution` function, supporting a subset of
181 The data it returns may not exactly be the same, because it uses more data
182 sources than the original function, and that may lead to different data if
183 the OS distribution is not consistent across multiple data sources it
184 provides (there are indeed such distributions ...).
186 Another reason for differences is the fact that the :func:`distro.id`
187 method normalizes the distro ID string to a reliable machine-readable value
188 for a number of popular OS distributions.
191 "distro.linux_distribution() is deprecated. It should only be used as a "
192 "compatibility shim with Python's platform.linux_distribution(). Please use "
193 "distro.id(), distro.version() and distro.name() instead.",
202 Return the distro ID of the current distribution, as a
203 machine-readable string.
205 For a number of OS distributions, the returned distro ID value is
206 *reliable*, in the sense that it is documented and that it does not change
207 across releases of the distribution.
209 This package maintains the following reliable distro ID values:
211 ============== =========================================
212 Distro ID Distribution
213 ============== =========================================
216 "rhel" RedHat Enterprise Linux
219 "sles" SUSE Linux Enterprise Server
223 "buildroot" Buildroot
224 "cloudlinux" CloudLinux OS
225 "exherbo" Exherbo Linux
226 "gentoo" GenToo Linux
227 "ibm_powerkvm" IBM PowerKVM
228 "kvmibm" KVM for IBM z Systems
229 "linuxmint" Linux Mint
231 "mandriva" Mandriva Linux
232 "parallels" Parallels
235 "oracle" Oracle Linux (and Oracle Enterprise Linux)
236 "scientific" Scientific Linux
237 "slackware" Slackware
238 "xenserver" XenServer
242 "midnightbsd" MidnightBSD
246 ============== =========================================
248 If you have a need to get distros for reliable IDs added into this set,
249 or if you find that the :func:`distro.id` function returns a different
250 distro ID for one of the listed distros, please create an issue in the
251 `distro issue tracker`_.
253 **Lookup hierarchy and transformations:**
255 First, the ID is obtained from the following sources, in the specified
256 order. The first available and non-empty value is used:
258 * the value of the "ID" attribute of the os-release file,
260 * the value of the "Distributor ID" attribute returned by the lsb_release
263 * the first part of the file name of the distro release file,
265 The so determined ID value then passes the following transformations,
266 before it is returned by this method:
268 * it is translated to lower case,
270 * blanks (which should not be there anyway) are translated to underscores,
272 * a normalization of the ID is performed, based upon
273 `normalization tables`_. The purpose of this normalization is to ensure
274 that the ID is as reliable as possible, even across incompatible changes
275 in the OS distributions. A common reason for an incompatible change is
276 the addition of an os-release file, or the addition of the lsb_release
277 command, with ID values that differ from what was previously determined
278 from the distro release file name.
283def name(pretty: bool =
False) -> str:
285 Return the name of the current OS distribution, as a human-readable
288 If *pretty* is false, the name is returned without version or codename.
289 (e.g. "CentOS Linux")
291 If *pretty* is true, the version and codename are appended.
292 (e.g. "CentOS Linux 7.1.1503 (Core)")
294 **Lookup hierarchy:**
296 The name is obtained from the following sources, in the specified order.
297 The first available and non-empty value is used:
299 * If *pretty* is false:
301 - the value of the "NAME" attribute of the os-release file,
303 - the value of the "Distributor ID" attribute returned by the lsb_release
306 - the value of the "<name>" field of the distro release file.
308 * If *pretty* is true:
310 - the value of the "PRETTY_NAME" attribute of the os-release file,
312 - the value of the "Description" attribute returned by the lsb_release
315 - the value of the "<name>" field of the distro release file, appended
316 with the value of the pretty version ("<version_id>" and "<codename>"
317 fields) of the distro release file, if available.
322def version(pretty: bool =
False, best: bool =
False) -> str:
324 Return the version of the current OS distribution, as a human-readable
327 If *pretty* is false, the version is returned without codename (e.g.
330 If *pretty* is true, the codename in parenthesis is appended, if the
331 codename is non-empty (e.g. "7.0 (Maipo)").
333 Some distributions provide version numbers with different precisions in
334 the different sources of distribution information. Examining the different
335 sources in a fixed priority order does not always yield the most precise
336 version (e.g. for Debian 8.2, or CentOS 7.1).
338 Some other distributions may not provide this kind of information. In these
339 cases, an empty string would be returned. This behavior can be observed
340 with rolling releases distributions (e.g. Arch Linux).
342 The *best* parameter can be used to control the approach for the returned
345 If *best* is false, the first non-empty version number in priority order of
346 the examined sources is returned.
348 If *best* is true, the most precise version number out of all examined
351 **Lookup hierarchy:**
353 In all cases, the version number is obtained from the following sources.
354 If *best* is false, this order represents the priority order:
356 * the value of the "VERSION_ID" attribute of the os-release file,
357 * the value of the "Release" attribute returned by the lsb_release
359 * the version number parsed from the "<version_id>" field of the first line
360 of the distro release file,
361 * the version number parsed from the "PRETTY_NAME" attribute of the
362 os-release file, if it follows the format of the distro release files.
363 * the version number parsed from the "Description" attribute returned by
364 the lsb_release command, if it follows the format of the distro release
370def version_parts(best: bool =
False) -> Tuple[str, str, str]:
372 Return the version of the current OS distribution as a tuple
373 ``(major, minor, build_number)`` with items as follows:
375 * ``major``: The result of :func:`distro.major_version`.
377 * ``minor``: The result of :func:`distro.minor_version`.
379 * ``build_number``: The result of :func:`distro.build_number`.
381 For a description of the *best* parameter, see the :func:`distro.version`
387def major_version(best: bool =
False) -> str:
389 Return the major version of the current OS distribution, as a string,
391 Otherwise, the empty string is returned. The major version is the first
392 part of the dot-separated version string.
394 For a description of the *best* parameter, see the :func:`distro.version`
400def minor_version(best: bool =
False) -> str:
402 Return the minor version of the current OS distribution, as a string,
404 Otherwise, the empty string is returned. The minor version is the second
405 part of the dot-separated version string.
407 For a description of the *best* parameter, see the :func:`distro.version`
413def build_number(best: bool =
False) -> str:
415 Return the build number of the current OS distribution, as a string,
417 Otherwise, the empty string is returned. The build number is the third part
418 of the dot-separated version string.
420 For a description of the *best* parameter, see the :func:`distro.version`
428 Return a space-separated list of distro IDs of distributions that are
429 closely related to the current OS distribution in regards to packaging
430 and programming interfaces, for example distributions the current
431 distribution is a derivative from.
433 **Lookup hierarchy:**
435 This information item is only provided by the os-release file.
436 For details, see the description of the "ID_LIKE" attribute in the
438 <http://www.freedesktop.org/software/systemd/man/os-release.html>`_.
445 Return the codename for the release of the current OS distribution,
448 If the distribution does not have a codename, an empty string is returned.
450 Note that the returned codename is not always really a codename. For
451 example, openSUSE returns "x86_64". This function does not handle such
452 cases in any special way and just returns the string it finds, if any.
454 **Lookup hierarchy:**
456 * the codename within the "VERSION" attribute of the os-release file, if
459 * the value of the "Codename" attribute returned by the lsb_release
462 * the value of the "<codename>" field of the distro release file.
467def info(pretty: bool =
False, best: bool =
False) -> InfoDict:
469 Return certain machine-readable information items about the current OS
470 distribution in a dictionary, as shown in the following example:
472 .. sourcecode:: python
486 The dictionary structure and keys are always the same, regardless of which
487 information items are available in the underlying data sources. The values
488 for the various keys are as follows:
490 * ``id``: The result of :func:`distro.id`.
492 * ``version``: The result of :func:`distro.version`.
494 * ``version_parts -> major``: The result of :func:`distro.major_version`.
496 * ``version_parts -> minor``: The result of :func:`distro.minor_version`.
498 * ``version_parts -> build_number``: The result of
499 :func:`distro.build_number`.
501 * ``like``: The result of :func:`distro.like`.
503 * ``codename``: The result of :func:`distro.codename`.
505 For a description of the *pretty* and *best* parameters, see the
506 :func:`distro.version` method.
513 Return a dictionary containing key-value pairs for the information items
514 from the os-release file data source of the current OS distribution.
516 See `os-release file`_ for details about these information items.
523 Return a dictionary containing key-value pairs for the information items
524 from the lsb_release command data source of the current OS distribution.
526 See `lsb_release command output`_ for details about these information
534 Return a dictionary containing key-value pairs for the information items
535 from the distro release file data source of the current OS distribution.
537 See `distro release file`_ for details about these information items.
544 Return a dictionary containing key-value pairs for the information items
545 from the distro release file data source of the current OS distribution.
550def os_release_attr(attribute: str) -> str:
552 Return a single named information item from the os-release file data source
553 of the current OS distribution.
557 * ``attribute`` (string): Key of the information item.
561 * (string): Value of the information item, if the item exists.
562 The empty string, if the item does not exist.
564 See `os-release file`_ for details about these information items.
569def lsb_release_attr(attribute: str) -> str:
571 Return a single named information item from the lsb_release command output
572 data source of the current OS distribution.
576 * ``attribute`` (string): Key of the information item.
580 * (string): Value of the information item, if the item exists.
581 The empty string, if the item does not exist.
583 See `lsb_release command output`_ for details about these information
589def distro_release_attr(attribute: str) -> str:
591 Return a single named information item from the distro release file
592 data source of the current OS distribution.
596 * ``attribute`` (string): Key of the information item.
600 * (string): Value of the information item, if the item exists.
601 The empty string, if the item does not exist.
603 See `distro release file`_ for details about these information items.
608def uname_attr(attribute: str) -> str:
610 Return a single named information item from the distro release file
611 data source of the current OS distribution.
615 * ``attribute`` (string): Key of the information item.
619 * (string): Value of the information item, if the item exists.
620 The empty string, if the item does not exist.
626 from functools
import cached_property
630 """A version of @property which caches the value. On access, it calls the
631 underlying function and sets the value in `__dict__` so future accesses
632 will not re-call the property.
635 def __init__(self, f: Callable[[Any], Any]) ->
None:
639 def __get__(self, obj: Any, owner: Type[Any]) -> Any:
640 assert obj
is not None, f
"call {self._fname} on an instance"
647 Provides information about a OS distribution.
649 This package creates a private module-global instance of this class with
650 default initialization arguments, that is used by the
651 `consolidated accessor functions`_ and `single source accessor functions`_.
652 By using default initialization arguments, that module-global instance
653 returns data about the current OS distribution (i.e. the distro this
656 Normally, it is not necessary to create additional instances of this class.
657 However, in situations where control is needed over the exact data sources
658 that are used, instances of this class can be created with a specific
659 distro release file, or a specific os-release file, or without invoking the
665 include_lsb: Optional[bool] =
None,
666 os_release_file: str =
"",
667 distro_release_file: str =
"",
668 include_uname: Optional[bool] =
None,
669 root_dir: Optional[str] =
None,
670 include_oslevel: Optional[bool] =
None,
673 The initialization method of this class gathers information from the
674 available data sources, and stores that in private instance attributes.
675 Subsequent access to the information items uses these private instance
676 attributes, so that the data sources are read only once.
680 * ``include_lsb`` (bool): Controls whether the
681 `lsb_release command output`_ is included as a data source.
683 If the lsb_release command is not available in the program execution
684 path, the data source for the lsb_release command will be empty.
686 * ``os_release_file`` (string): The path name of the
687 `os-release file`_ that is to be used as a data source.
689 An empty string (the default) will cause the default path name to
690 be used (see `os-release file`_ for details).
692 If the specified or defaulted os-release file does not exist, the
693 data source for the os-release file will be empty.
695 * ``distro_release_file`` (string): The path name of the
696 `distro release file`_ that is to be used as a data source.
698 An empty string (the default) will cause a default search algorithm
699 to be used (see `distro release file`_ for details).
701 If the specified distro release file does not exist, or if no default
702 distro release file can be found, the data source for the distro
703 release file will be empty.
705 * ``include_uname`` (bool): Controls whether uname command output is
706 included as a data source. If the uname command is not available in
707 the program execution path the data source for the uname command will
710 * ``root_dir`` (string): The absolute path to the root directory to use
711 to find distro-related information files. Note that ``include_*``
712 parameters must not be enabled in combination with ``root_dir``.
714 * ``include_oslevel`` (bool): Controls whether (AIX) oslevel command
715 output is included as a data source. If the oslevel command is not
716 available in the program execution path the data source will be
719 Public instance attributes:
721 * ``os_release_file`` (string): The path name of the
722 `os-release file`_ that is actually used as a data source. The
723 empty string if no distro release file is used as a data source.
725 * ``distro_release_file`` (string): The path name of the
726 `distro release file`_ that is actually used as a data source. The
727 empty string if no distro release file is used as a data source.
729 * ``include_lsb`` (bool): The result of the ``include_lsb`` parameter.
730 This controls whether the lsb information will be loaded.
732 * ``include_uname`` (bool): The result of the ``include_uname``
733 parameter. This controls whether the uname information will
736 * ``include_oslevel`` (bool): The result of the ``include_oslevel``
737 parameter. This controls whether (AIX) oslevel information will be
740 * ``root_dir`` (string): The result of the ``root_dir`` parameter.
741 The absolute path to the root directory to use to find distro-related
746 * :py:exc:`ValueError`: Initialization parameters combination is not
749 * :py:exc:`OSError`: Some I/O issue with an os-release file or distro
752 * :py:exc:`UnicodeError`: A data source has unexpected characters or
753 uses an unexpected encoding.
758 os.path.join(root_dir,
"usr/lib")
if root_dir
else _UNIXUSRLIBDIR
772 usr_lib_os_release_file
780 is_root_dir_defined = root_dir
is not None
781 if is_root_dir_defined
and (include_lsb
or include_uname
or include_oslevel):
783 "Including subprocess data sources from specific root_dir is disallowed"
784 " to prevent false information"
787 include_lsb
if include_lsb
is not None else not is_root_dir_defined
790 include_uname
if include_uname
is not None else not is_root_dir_defined
793 include_oslevel
if include_oslevel
is not None else not is_root_dir_defined
797 """Return repr of all info"""
800 "os_release_file={self.os_release_file!r}, "
801 "distro_release_file={self.distro_release_file!r}, "
802 "include_lsb={self.include_lsb!r}, "
803 "include_uname={self.include_uname!r}, "
804 "include_oslevel={self.include_oslevel!r}, "
805 "root_dir={self.root_dir!r}, "
806 "_os_release_info={self._os_release_info!r}, "
807 "_lsb_release_info={self._lsb_release_info!r}, "
808 "_distro_release_info={self._distro_release_info!r}, "
809 "_uname_info={self._uname_info!r}, "
810 "_oslevel_info={self._oslevel_info!r})".format(self=self)
813 def linux_distribution(
814 self, full_distribution_name: bool =
True
815 ) -> Tuple[str, str, str]:
817 Return information about the OS distribution that is compatible
818 with Python's :func:`platform.linux_distribution`, supporting a subset
821 For details, see :func:`distro.linux_distribution`.
824 self.
name()
if full_distribution_name
else self.
id(),
830 """Return the distro ID of the OS distribution, as a string.
832 For details, see :func:`distro.id`.
835 def normalize(distro_id: str, table: Dict[str, str]) -> str:
841 return normalize(distro_id, NORMALIZED_OS_ID)
845 return normalize(distro_id, NORMALIZED_LSB_ID)
849 return normalize(distro_id, NORMALIZED_DISTRO_ID)
853 return normalize(distro_id, NORMALIZED_DISTRO_ID)
857 def name(self, pretty: bool =
False) -> str:
859 Return the name of the OS distribution, as a string.
861 For details, see :func:`distro.name`.
875 version = self.
version(pretty=
True)
877 name = f
"{name} {version}"
880 def version(self, pretty: bool =
False, best: bool =
False) -> str:
882 Return the version of the OS distribution, as a string.
884 For details, see :func:`distro.version`.
895 ).get(
"version_id",
""),
901 elif self.
id() ==
"debian" or "debian" in self.
like().split():
918 if pretty
and version
and self.
codename():
919 version = f
"{version} ({self.codename()})"
922 def version_parts(self, best: bool =
False) -> Tuple[str, str, str]:
924 Return the version of the OS distribution, as a tuple of version
927 For details, see :func:`distro.version_parts`.
929 version_str = self.
version(best=best)
931 version_regex =
re.compile(
r"(\d+)\.?(\d+)?\.?(\d+)?")
935 return major, minor
or "", build_number
or ""
938 def major_version(self, best: bool =
False) -> str:
940 Return the major version number of the current distribution.
942 For details, see :func:`distro.major_version`.
946 def minor_version(self, best: bool =
False) -> str:
948 Return the minor version number of the current distribution.
950 For details, see :func:`distro.minor_version`.
954 def build_number(self, best: bool =
False) -> str:
956 Return the build number of the current distribution.
958 For details, see :func:`distro.build_number`.
964 Return the IDs of distributions that are like the OS distribution.
966 For details, see :func:`distro.like`.
972 Return the codename of the OS distribution.
974 For details, see :func:`distro.codename`.
987 def info(self, pretty: bool =
False, best: bool =
False) -> InfoDict:
989 Return certain machine-readable information about the OS
992 For details, see :func:`distro.info`.
996 version=self.
version(pretty, best),
1008 Return a dictionary containing key-value pairs for the information
1009 items from the os-release file data source of the OS distribution.
1011 For details, see :func:`distro.os_release_info`.
1017 Return a dictionary containing key-value pairs for the information
1018 items from the lsb_release command data source of the OS
1021 For details, see :func:`distro.lsb_release_info`.
1027 Return a dictionary containing key-value pairs for the information
1028 items from the distro release file data source of the OS
1031 For details, see :func:`distro.distro_release_info`.
1037 Return a dictionary containing key-value pairs for the information
1038 items from the uname command data source of the OS distribution.
1040 For details, see :func:`distro.uname_info`.
1046 Return AIX' oslevel command output.
1050 def os_release_attr(self, attribute: str) -> str:
1052 Return a single named information item from the os-release file data
1053 source of the OS distribution.
1055 For details, see :func:`distro.os_release_attr`.
1059 def lsb_release_attr(self, attribute: str) -> str:
1061 Return a single named information item from the lsb_release command
1062 output data source of the OS distribution.
1064 For details, see :func:`distro.lsb_release_attr`.
1068 def distro_release_attr(self, attribute: str) -> str:
1070 Return a single named information item from the distro release file
1071 data source of the OS distribution.
1073 For details, see :func:`distro.distro_release_attr`.
1077 def uname_attr(self, attribute: str) -> str:
1079 Return a single named information item from the uname command
1080 output data source of the OS distribution.
1082 For details, see :func:`distro.uname_attr`.
1089 Get the information items from the specified os-release file.
1092 A dictionary containing all information items.
1102 Parse the lines of an os-release file.
1106 * lines: Iterable through the lines in the os-release file.
1107 Each line must be a unicode string or a UTF-8 encoded byte
1111 A dictionary containing all information items.
1117 tokens = list(lexer)
1118 for token
in tokens:
1130 if "version" in props:
1132 match =
re.search(
r"\((\D+)\)|,\s*(\D+)", props[
"version"])
1135 props[
"codename"] = props[
"release_codename"] = release_codename
1137 if "version_codename" in props:
1142 props[
"codename"] = props[
"version_codename"]
1143 elif "ubuntu_codename" in props:
1145 props[
"codename"] = props[
"ubuntu_codename"]
1152 Get the information items from the lsb_release command output.
1155 A dictionary containing all information items.
1160 cmd = (
"lsb_release",
"-a")
1171 Parse the output of the lsb_release command.
1175 * lines: Iterable through the lines of the lsb_release output.
1176 Each line must be a unicode string or a UTF-8 encoded byte
1180 A dictionary containing all information items.
1197 cmd = (
"uname",
"-rs")
1212 return self.
_to_str(stdout).strip()
1221 except FileNotFoundError:
1229 match =
re.search(
r"^([^\s]+)\s+([\d\.]+)", lines[0].strip())
1239 props[
"name"] = name
1240 props[
"release"] = version
1251 Get the information items from the specified distro release file.
1254 A dictionary containing all information items.
1271 if basename
not in _DISTRO_RELEASE_IGNORE_BASENAMES
1283 basenames = _DISTRO_RELEASE_BASENAMES
1284 for basename
in basenames:
1291 if "name" not in distro_info:
1298 if match
is not None:
1303 distro_info[
"id"] =
"cloudlinux"
1309 Parse a distro release file.
1313 * filepath: Path name of the distro release file.
1316 A dictionary containing all information items.
1319 with open(filepath, encoding=
"utf-8")
as fp:
1332 Parse a line from a distro release file.
1335 * line: Line from the distro release file. Must be a unicode string
1336 or a UTF-8 encoded byte string.
1339 A dictionary containing all information items.
1365 "--json",
"-j", help=
"Output in machine readable format", action=
"store_true"
1373 help=
"Path to the root filesystem directory (defaults to /)",
1381 include_uname=
False,
1382 include_oslevel=
False,
1395 logger.info(
"Codename: %s", distribution_codename)
1398if __name__ ==
"__main__":
str uname_attr(self, str attribute)
Dict[str, str] _os_release_info(self)
Dict[str, str] _parse_distro_release_content(str line)
str name(self, bool pretty=False)
Dict[str, str] _parse_uname_content(Sequence[str] lines)
str distro_release_attr(self, str attribute)
str major_version(self, bool best=False)
Dict[str, str] _parse_distro_release_file(self, str filepath)
str minor_version(self, bool best=False)
Dict[str, str] _uname_info(self)
Dict[str, str] _lsb_release_info(self)
str _debian_version(self)
str lsb_release_attr(self, str attribute)
Tuple[str, str, str] version_parts(self, bool best=False)
str _to_str(bytes bytestring)
Dict[str, str] _parse_os_release_content(TextIO lines)
str build_number(self, bool best=False)
str version(self, bool pretty=False, bool best=False)
str os_release_attr(self, str attribute)
Dict[str, str] _distro_release_info(self)
None __init__(self, Optional[bool] include_lsb=None, str os_release_file="", str distro_release_file="", Optional[bool] include_uname=None, Optional[str] root_dir=None, Optional[bool] include_oslevel=None)
Dict[str, str] _parse_lsb_release_content(Iterable[str] lines)
Any __get__(self, Any obj, Type[Any] owner)
None __init__(self, Callable[[Any], Any] f)
Dict[str, str] uname_info()
Dict[str, str] lsb_release_info()
Dict[str, str] distro_release_info()
Dict[str, str] os_release_info()