Linux command
lpinfo 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List available printers
lpinfo -v
List available printer drivers
lpinfo -m
List drivers matching keyword
lpinfo -m | grep -i [keyword]
Show long printer names
lpinfo -l -v
List drivers for specific make
lpinfo --make-and-model "[HP LaserJet]" -m
Exclude specific schemes
lpinfo -v --exclude-schemes [dnssd]
Include only specific schemes
lpinfo -v --include-schemes [usb,parallel]
说明
lpinfo lists available printers and printer drivers known to CUPS. It queries the CUPS server for devices and PPD (PostScript Printer Description) files. Device listing (-v) shows all detected printer connections including USB, network, and parallel ports. Each entry includes a device URI that can be used when adding printers with lpadmin. Driver listing (-m) shows PPD files that describe printer capabilities. PPDs define paper sizes, resolutions, color options, and other features. Driverless printing uses generic IPP Everywhere or AirPrint drivers. The make-and-model filter helps find drivers for specific printers. Combined with grep, you can search for compatible drivers for your hardware. Network printer discovery may include DNS-SD (Bonjour/Avahi) discovered printers. Use scheme filters to focus on specific connection types.
参数
- -l
- Show long listing with device details.
- -m
- List available printer drivers (PPD files).
- -v
- List available printer devices.
- --device-id _ID_
- Show only devices matching IEEE-1284 device ID.
- --make-and-model _PATTERN_
- Filter by make and model string.
- --exclude-schemes _SCHEMES_
- Exclude device URIs matching schemes.
- --include-schemes _SCHEMES_
- Include only device URIs matching schemes.
- -h _SERVER_
- Connect to CUPS server.
- --timeout _SECONDS_
- Timeout for device discovery.
FAQ
What is the lpinfo command used for?
lpinfo lists available printers and printer drivers known to CUPS. It queries the CUPS server for devices and PPD (PostScript Printer Description) files. Device listing (-v) shows all detected printer connections including USB, network, and parallel ports. Each entry includes a device URI that can be used when adding printers with lpadmin. Driver listing (-m) shows PPD files that describe printer capabilities. PPDs define paper sizes, resolutions, color options, and other features. Driverless printing uses generic IPP Everywhere or AirPrint drivers. The make-and-model filter helps find drivers for specific printers. Combined with grep, you can search for compatible drivers for your hardware. Network printer discovery may include DNS-SD (Bonjour/Avahi) discovered printers. Use scheme filters to focus on specific connection types.
How do I run a basic lpinfo example?
Run `lpinfo -v` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -l do in lpinfo?
Show long listing with device details.