CUPS - Common UNIX Printing System - commands

Install CUPS and you get the print server cupsd and the print commands lpstat, lpr and lpq, amongst others. I installed CUPS on two Gentoo boxes, following the Gentoo Printing Guide. On one of these machines I run the cupsd server.

To specify the print server on the client machine, edit /etc/cups/client.conf to contain:

ServerName the.print.server

lpstat can be used to get status information. For example, the following command shows the accepting state of printer queues. If no printers are specified then all printers are listed, in my case my HP LazerJet 1100.

localhost # lpstat -a
HPLJ1100 accepting requests since Jan 01 00:00

If you want to check a different server:

lpstat -h the.other.server -a

Print a file:

lpr [filename]

Specify printer, page size and grayscale (i.e. no colour):

lpr -P Epson_stylus_c66 -o PageSize=A4 -o ColorModel=Grayscale [filename]

Last modified: 06/11/2007 Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top