discover
Discover system hardware
SYNOPSIS
discover [options]
PARAMETERS
-a, --all
Lists all detected hardware components without filtering.
-v, --verbose
Increases the verbosity of the output, providing more detailed information.
-q, --quiet
Reduces the verbosity of the output, showing only essential information.
-x, --xml
Outputs the hardware information in XML format, suitable for machine parsing.
-p, --pretty
When used with --xml, pretty-prints the XML output for better readability.
-C
Filters the output to only show devices belonging to a specified class (e.g., `net`, `disk`, `pci`, `usb`).
-D
Filters the output to show information for a specific device name (e.g., `eth0`).
-o
Behaves as if running on a specified operating system (e.g., `linux`, `freebsd`).
-V, --version
Displays the version information for the discover command.
-h, --help
Shows a help message with available options and usage.
DESCRIPTION
The discover command is a hardware detection utility primarily used in Debian-based Linux distributions (provided by the `discover1` package). It plays a crucial role in identifying various hardware components of a system, such as network interfaces, storage devices, PCI devices, USB devices, and more. This information is vital during system installation, configuration, and troubleshooting to ensure the correct drivers and kernel modules are loaded and properly configured.
discover works by querying the kernel and various system interfaces to build a comprehensive list of detected hardware. Its output can be consumed by other scripts and tools, particularly during the `debconf` setup phase of Debian installations, to automate the configuration of hardware-dependent packages. While newer and more general-purpose hardware listing tools exist, discover historically provided a tailored approach for Debian's specific needs, helping to make the installation process smoother and more automated for a wide range of hardware.
CAVEATS
The discover command is primarily a Debian/Ubuntu-specific utility and may not be found or have the same functionality on other Linux distributions. Its direct use by end-users for general hardware querying has somewhat diminished with the rise of more universally available and frequently updated tools like `lshw`, `lspci`, and `lsusb`, which often provide more comprehensive or up-to-date hardware details. Its primary legacy strength lies in its integration within Debian's installation and configuration processes.
ROLE IN SYSTEM AUTOMATION
Beyond manual use, discover's ability to output hardware information in machine-readable formats (like XML) makes it valuable for scripted automation. System administrators and developers can parse its output to dynamically adapt system configurations based on detected hardware, which is particularly useful in large-scale deployments or custom installation environments.
HISTORY
The discover utility gained prominence in the early 2000s, especially within the Debian project, as a robust tool for automatic hardware detection during system installation. Its development was driven by the need to simplify the often complex process of identifying and configuring hardware components for users, ensuring the correct kernel modules and drivers were loaded. It was deeply integrated into Debian's `debconf` system, facilitating scripted and automated installations across a wide variety of hardware. While its direct relevance for manual user queries has been superseded by more modern and generic tools, it remains an important historical component of Debian's approach to hardware configuration.


