Linux command
lpq 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show print queue
lpq
Show specific printer queue
lpq -P [printer]
Show all printers
lpq -a
Show long listing
lpq -l
Show queue for a specific user
lpq -P [printer] [username]
Continuous updates
lpq +[5]
说明
lpq displays the current print queue status, showing pending and active jobs along with their owners, job IDs, file names, and sizes. Without arguments, it shows the default printer's queue. The tool provides the BSD-style interface for viewing print queues, now typically implemented by CUPS. It is useful for checking job status, diagnosing stuck queues, and monitoring print activity.
参数
- -P _PRINTER_
- Specify printer.
- -a
- Show all printers.
- -l
- Long listing format.
- + _INTERVAL_
- Repeat every interval seconds.
- --help
- Display help information.
FAQ
What is the lpq command used for?
lpq displays the current print queue status, showing pending and active jobs along with their owners, job IDs, file names, and sizes. Without arguments, it shows the default printer's queue. The tool provides the BSD-style interface for viewing print queues, now typically implemented by CUPS. It is useful for checking job status, diagnosing stuck queues, and monitoring print activity.
How do I run a basic lpq example?
Run `lpq` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -P _PRINTER_ do in lpq?
Specify printer.