LinuxCommandLibrary

debman

View Debian package maintainer manual pages

TLDR

Read a man page for a command that is provided by a specified [p]ackage

$ debman -p [package] [command]
copy

Specify a [p]ackage version to download
$ debman -p [package]=[version] [command]
copy

Read a man page in a .deb [f]ile
$ debman -f [path/to/filename.deb] [command]
copy

SYNOPSIS

debman [options] package-name [document-name]

PARAMETERS

-f <file> or --file=<file>
    Directly view the specified file, bypassing package lookup. Useful for arbitrary documentation files.

-l or --list
    List all available documentation files and manual pages for the specified package.

-s <section> or --section=<section>
    When viewing a manual page, specify the manual section (e.g., 1, 5, 8).

-d <distro> or --distribution=<distro>
    Specify the distribution (e.g., 'Debian', 'Ubuntu') to override default search paths, mainly for internal use or specific setups.

-h or --help
    Display a brief help message and exit.

-v or --version
    Show program version information and exit.

--pager=<command>
    Use the specified command as the pager (e.g., `less`, `more`). Overrides the `PAGER` environment variable.

--no-pager
    Do not use a pager for output, displaying content directly to standard output.

--highlight-pager-output
    Attempt to highlight output when using a pager, which can improve readability for certain document types.

--no-highlight
    Do not attempt to highlight output.

DESCRIPTION

debman is a command-line utility for Debian-based systems that provides a convenient way to access documentation associated with installed Debian packages. Instead of manually searching for man pages, README files, NEWS files, or changelog files within the /usr/share/doc/ hierarchy, debman automates this process. It can display traditional manual pages (if available and not hidden), but its primary strength lies in its ability to present package-specific documentation found in /usr/share/doc/<package_name>. This includes files like README.Debian, NEWS.Debian, changelog.Debian.gz, and other relevant documentation. Users can often select which document to view if multiple options exist for a given package. This makes it an invaluable tool for understanding the specifics of how a particular package is configured, used, or has changed over time on a Debian system.

CAVEATS

debman requires the target package to be installed on the system to locate its documentation within the standard /usr/share/doc/ hierarchy. It relies on package maintainers placing documentation files in conventional locations. While it can display manual pages, its primary strength is in finding non-manpage documentation like READMEs and changelogs. It is specifically designed for Debian-based systems.

COMMON USAGE PATTERNS


debman <package_name>: Views documentation for the specified package, often presenting a menu if multiple documents exist, allowing the user to choose.
debman -l <package_name>: Lists all available documentation files and manual pages for the package.
debman <package_name> <document_name>: Directly opens a specific document (e.g., `changelog`, `README`, `NEWS`) for the package, if it exists.
debman -s <section> <man_page_name>: Views a specific manual page from a designated section, useful when a man page shares a name with a command in another section.

ENVIRONMENT VARIABLES

The `PAGER` environment variable can be set to specify the default program used to display output (e.g., `export PAGER=most`). This can be overridden by the `--pager` option.

HISTORY

debman is part of the `debian-goodies` package, a collection of useful utilities for Debian systems. Its development addresses the practical need for a more intuitive way to access documentation associated with installed Debian packages, particularly those files not typically exposed through the standard `man` command (e.g., `README.Debian`, `changelog.Debian.gz`). It has evolved as a stable and well-maintained tool within the Debian ecosystem, aiming to enhance the user experience by simplifying documentation retrieval.

SEE ALSO

man(1), dpkg(1), apt(8), less(1)

Copied to clipboard