lsb_release
| Use Case | Command | Description |
|---|---|---|
| Get distribution information | get_distro_information() | Returns a tuple with distributor ID, description, release, and codename |
| Guess Debian release from apt sources | guess_release_from_apt() | Determines the release based on APT repository configuration |
| Look up codename for a release | lookup_codename('11') | Maps a release number to its codename (e.g., 'bullseye') |
| Compare two releases | compare_release('11', '10') | Compares two Debian release identifiers |
| Check if LSB modules are installed | check_modules_installed() | Verifies that required LSB packages are present (Debianโspecific) |
# LSB release detection module for Debian
# (C) 2005-10 Chris Lawrence <lawrencc AT debian.org>
# (C) 2018 Didier Raboud <odyx AT debian.org>
check_modules_installed() โ This is Debianโspecific at presentcompare_release(x, y)get_distro_info(origin='Debian')get_distro_information()get_os_release() โ Whatever is guessed above can be overridden in /usr/lib/osโrelease by derivativesguess_debian_release()guess_release_from_apt(origin='Debian', component='main', ignoresuites='experimental', label='Debian', alternate_olabels={'Debian Ports': ('ftp.ports.debian.org', 'ftp.debian-ports.org')})lookup_codename(release, unknown=None)parse_apt_policy()parse_policy_line(data)release_index(x)test()valid_lsb_versions(version, module)PACKAGES = 'lsb-core lsb-cxx lsb-graphics lsb-desktop lsb-languages ls...'RELEASES_ORDER = ['buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', 'woo...']RELEASE_CODENAME_LOOKUP = {'1.1': 'buzz', '1.2': 'rex', '1.3': 'bo', '...'}TESTING_CODENAME = 'unknown.new.testing'longnames = {'a': 'suite', 'c': 'component', 'l': 'label', 'o': 'origi...'}modnamere = re.compile('lsb-(?P<module>[a-z0-9]+)-(?P<arch>[^ ]+)(?: \\...')print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0)...)/usr/lib/python3/dist-packages/lsb_release.py
Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 16:24 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format