From UW-Math Wiki
Revision as of 21:18, 18 October 2011 by Ynagel (talk | contribs)
Jump to navigation Jump to search

A sampler of lp commands

If you use command line to print, send only postscript or pdf files to the copier. The basic command is

        lp  file.pdf

By default, you will get duplexed (long-edge), grayscale prints if you print to the copiers. Some useful options are


        lp -d P file.pdf  (send file to printer P - e.g. P=5)
        lp -o sides=one-sided file.pdf  (to each page on one side only)
        lp -o ColorModel=color file.pdf    (print in color)
        lp -o sides=two-sided-short-edge  file.pdf  (duplex along short edge instead of long)
        lp -o page-ranges=1  (print just page 1)
        lp -o page-ranges=1-4,7,9-12

You can combine these commands, for example:

        lp -o sides=two-sided-short-edge -o ColorModel=color file.pdf  (useful for printing tri-fold brochures)


Use the lpoptions command to save these options for later use. For example, you might want to do color printing to the printer on another floor, reserving the printer on your own floor for the normal grayscale prints. This command will ensure that anything you send to the 5th floor printer will be printed in color:

        lpoptions -d 5  ColorModel=color

your lpoptions commands are saved in the file ~/.cups/lpoptions. Typing lpoptions by itself will show you what your current printer setup is.

Checking the queue

Use the lpstat command to check the status of a queue and cancel to cancel jobs

       lpstat -d5 -t   (checks jobs on queue 5)
       cancel  5-241   (deletes job 5-241 from queue 5)