1lp(1)                            OpenPrinting                            lp(1)
2
3
4

NAME

6       lp - print files
7

SYNOPSIS

9       lp  [  -h hostname[:port] ] [ -E ] [ -U username ] [ -c ] [ -d destina‐
10       tion[/instance] ] [ -m ] [ -n num-copies ] [ -o option[=value] ]  [  -q
11       priority  ] [ -s ] [ -t title ] [ -H handling ] [ -P page-list ] [ -- ]
12       [ file(s) ]
13       lp [ -h hostname[:port] ] [ -E ] [ -U username ] [ -c ] [ -i job-id ] [
14       -n num-copies ] [ -o option[=value] ] [ -q priority ] [ -t title ] [ -H
15       handling ] [ -P page-list ]
16

DESCRIPTION

18       lp submits files for printing or alters a pending job.  Use a  filename
19       of "-" to force printing from the standard input.
20
21   THE DEFAULT DESTINATION
22       CUPS  provides many ways to set the default destination. The LPDEST and
23       PRINTER environment variables are consulted first.  If neither are set,
24       the  current  default  set using the lpoptions(1) command is used, fol‐
25       lowed by the default set using the lpadmin(8) command.
26

OPTIONS

28       The following options are recognized by lp:
29
30       --   Marks the end of options; use this to print a file whose name  be‐
31            gins with a dash (-).
32
33       -E   Forces encryption when connecting to the server.
34
35       -U username
36            Specifies the username to use when connecting to the server.
37
38       -c   This  option is provided for backwards-compatibility only. On sys‐
39            tems that support it, this option forces  the  print  file  to  be
40            copied  to  the  spool  directory before printing.  In CUPS, print
41            files are always sent to the scheduler via IPP which has the  same
42            effect.
43
44       -d destination
45            Prints files to the named printer.
46
47       -h hostname[:port]
48            Chooses  an alternate server.  Note: This option must occur before
49            all others.
50
51       -i job-id
52            Specifies an existing job to modify.
53
54       -m   Sends an email when the job is completed.
55
56       -n copies
57            Sets the number of copies to print.
58
59       -o "name=value [ ... name=value ]"
60            Sets one or more job options.  See "COMMON JOB OPTIONS" below.
61
62       -q priority
63            Sets the job priority from 1 (lowest) to 100 (highest).   The  de‐
64            fault priority is 50.
65
66       -s   Do not report the resulting job IDs (silent mode.)
67
68       -t "name"
69            Sets the job name.
70
71       -H hh:mm
72
73       -H hold
74
75       -H immediate
76
77       -H restart
78
79       -H resume
80            Specifies  when  the  job should be printed.  A value of immediate
81            will print the file immediately, a value of hold will hold the job
82            indefinitely, and a UTC time value (HH:MM) will hold the job until
83            the specified UTC (not local) time.  Use a value  of  resume  with
84            the  -i  option to resume a held job.  Use a value of restart with
85            the -i option to restart a completed job.
86
87       -P page-list
88            Specifies which pages to print in the document.  The list can con‐
89            tain a list of numbers and ranges (#-#) separated by commas, e.g.,
90            "1,3-5,16".  The page numbers refer to the output  pages  and  not
91            the  document's  original pages - options like "number-up" can af‐
92            fect the numbering of the pages.
93
94   COMMON JOB OPTIONS
95       Aside from the printer-specific options reported  by  the  lpoptions(1)
96       command, the following generic options are available:
97
98       -o job-sheets=name
99            Prints a cover page (banner) with the document.  The "name" can be
100            "classified", "confidential", "secret",  "standard",  "topsecret",
101            or "unclassified".
102
103       -o media=size
104            Sets  the  page  size  to size. Most printers support at least the
105            size names "a4", "letter", and "legal".
106
107       -o number-up={2|4|6|9|16}
108            Prints 2, 4, 6, 9, or 16 document (input)  pages  on  each  output
109            page.
110
111       -o orientation-requested=4
112            Prints  the  job  in  landscape (rotated 90 degrees counter-clock‐
113            wise).
114
115       -o orientation-requested=5
116            Prints the job in landscape (rotated 90 degrees clockwise).
117
118       -o orientation-requested=6
119            Prints the job in reverse portrait (rotated 180 degrees).
120
121       -o print-quality=3
122
123       -o print-quality=4
124
125       -o print-quality=5
126            Specifies the output quality - draft (3), normal (4), or best (5).
127
128       -o sides=one-sided
129            Prints on one side of the paper.
130
131       -o sides=two-sided-long-edge
132            Prints on both sides of the paper for portrait output.
133
134       -o sides=two-sided-short-edge
135            Prints on both sides of the paper for landscape output.
136

CONFORMING TO

138       Unlike the System V printing system, CUPS allows printer names to  con‐
139       tain  any  printable  character  except SPACE, TAB, "/", or "#".  Also,
140       printer and class names are not case-sensitive.
141
142       The -q option accepts a different range of values than the  Solaris  lp
143       command,  matching  the  IPP job priority values (1-100, 100 is highest
144       priority) instead of the Solaris values (0-39, 0 is highest priority).
145

EXAMPLES

147       Print two copies of a document to the default printer:
148
149           lp -n 2 filename
150
151       Print a double-sided legal document to a printer called "foo":
152
153           lp -d foo -o media=legal -o sides=two-sided-long-edge filename
154
155       Print a presentation document 2-up to a printer called "bar":
156
157           lp -d bar -o number-up=2 filename
158

SEE ALSO

160       cancel(1),  lpadmin(8),  lpoptions(1),  lpq(1),  lpr(1),  lprm(1),  lp‐
161       stat(1), CUPS Online Help (http://localhost:631/help)
162
164       Copyright © 2021-2023 by OpenPrinting.
165
166
167
1682022-05-02                           CUPS                                lp(1)
Impressum