Printing CUPS lpr

From Noah.org
Revision as of 15:48, 12 June 2007 by Root (Talk | contribs) (New page: Category:Engineering I don't print from the command-line a lot. This is the minimal I usually need to know to get something printed. == listing installed printers == <pre> lpstat ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


I don't print from the command-line a lot. This is the minimal I usually need to know to get something printed.

listing installed printers

  lpstat -p

That will show something like the following. The important information is the printer name (NetworOptra-E321).

printer NetworkOptra-E321 is idle.  enabled since Tue 12 Jun 2007 03:42:31 PM PDT

printing to a named printer

You can print a document by specifying the printer name on the command-line:

lpr -P NetworkOptra-E321 my_document.txt

Or you can set the default printer with the PRINTER environment variable.

export PRINTER=NetworkOptra-E321
lpr -P NetworkOptra-E321 my_document.txt