GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
Printing |
20200323 CUPS, the Common Unix Printing System, is a printing system for Unix and GNU/Linux, implementing various protocols including the LPD (Line Printer Daemon) protocol, the IPP (Internet Printing Protocol) and others. It uses PPD (PostScript Printer Description) files to identify the features of a printer, maintains printer configurations, and provides access to the printer options through the command line or a browser. It also has client side filters to convert, for example, pdf to PostScript to avoid pages of raw output of pdf (for Postscript printers).
The cups-pdf package provides a virtual pdf printer to print to pdf files.
After installing cups visit https://localhost:631/in a browser to manage printers.
A command line interface is also available and below are some common tasks.
Identify printers broadcasting their device URI:
$ lpinfo -v |
List locally installed printers and their device URI:
$ lpstat -v |
Add a printer queue named F108 with specified device URI and enable the queue:
$ lpadmin -p F108 -v https://vitellius.dcs.ktu.edu:631/printers/F108 -E |
Submit a test page to the printer:
$ lpr -P F108 /usr/share/cups/data/testprint |
Check the print queue:
$ lpq -P F108 |
Remove the printer:
$ lpadmin -x F108 |
The printer information is collected into /etc/cups/printers.conf.