The lpstat command displays information about accessible printers and jobs.
Only the most commonly used options are shown here. For information about other options, see the lpstat(1) man page.
$ lpstat [-d] [-l] [-p] printer-name [-t]
Shows the default printer.
Shows that a printer is active or idle, and when the printer was enabled or disabled.
You can specify multiple printer names with this command. Use a space or a comma to separate printer names. If you use spaces, enclose the list of printer names in quotation marks. If you do not specify printer-name, the status of all printers is displayed.
Shows the characteristics of printers and jobs.
Shows status information about CUPS, including the status of all printers, for example whether printers are active and accepting print requests.
To display the status of the printer luna:
$ lpstat -p luna printer luna is idle. enabled since Jul 12 11:17 2011. available.
To display the system's default printer:
$ lpstat -d system default destination: luna
To display the description of the printers asteroid and luna:
$ lpstat -p "asteroid, luna" -D printer asteroid faulted. enabled since Jan 5 11:35 2011. available. unable to print: paper misfeed jam Description: Printer by break room printer luna is idle. enabled since Jan 5 11:36 2011. available. Description: Printer by server room.
To display the characteristics of the printer luna:
$ lpstat -l -p luna printer luna is idle. enabled since September 29, 2011 05:20:57 PM BST Form mounted: Content types: any Printer types: unknown Description: luna Alerts: none Location: Connection: direct On fault: no alert After fault: continue Users allowed: (all) Forms allowed: (none) Banner required Charset sets: (none) Default pitch: Default page size: Default port settings: