Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux lpq Command

Linux lpq Command

Linux Command Reference Linux Command Reference

The Linux lpq command is used to view the status of a print queue; it can show the printer queue status and the print jobs it contains.

Syntax

lpq [l] [P] [user]

Parameter Description:

Example

An empty queue for the system's default printer, printer.



$ lpq  

printer is ready  

no entries 

If no printer is specified in advance (using the -P option), the system will show the default printer. If you send a print job to the printer and then view the print queue, you will see a list like the following.



$ ls *.txt | pr -3 | lp  

request id is printer-603 (1 file(s))  

[me@linuxbox ~]$ lpq  

printer is ready and printing  

Rank    Owner   Job     File(s)                         Total Size  

active  me      603     (stdin)        

Linux Command Reference Linux Command Reference