KandZ – Tuts

We like to help…!

Linux CLI 52 🐧 lpstat, lpq and lprm commands

a - lpstat command
lpstat command provides information about the status of the printers
common options: -a → shows accepting state of printers
-p → shows all printers -d → shows current default destination
-s → shows a status summary -v → shows printers' attached devices
lpstat -a → shows accepting state of printers
lpstat -p → shows all printers
lpstat -d → shows current default destination
lpstat -s → shows a status summary

b - lpq command
lpq command shows the current print queue status
It provides information about jobs that are currently waitintg to be printed
common options: -a → shows jobs on all printers
-l → verbose report -P printer → specifies and alternative printer
lpq -l → shows verbose print queue status for default destination
lpq -P canon → shows print queue status for canon printer
lpq -l -P canon → shows verbose print queue status for canon printer

c - lprm command
lprm command removes jobs from the print queue
It allows you to cancel print jobs that are pending or being processed
common options: -P → specifies the printer
-U → specifies the user -h → specifies a server
lprm 345 → removes job 345
lprm -P canon 345 → removes job 345 for printer canon
lprm -P canon 345 - → removes all jobs for printer canon

Leave a Reply