4 <meta name=
"creator" content=
"mantohtml v2.0.2">
8 <h1 id=
"lp-1">lp(
1)
</h1>
9 <h2 id=
"lp-1.name">Name
</h2>
12 <h2 id=
"lp-1.synopsis">Synopsis
</h2>
13 <p><strong>lp
</strong>
15 <strong>-h
</strong><em>hostname
</em>[
<strong>:
</strong><em>port
</em>]
24 <strong>-d
</strong><em>destination
</em>[
<strong>/
</strong><em>instance
</em>]
31 <strong>-o
</strong><em>option
</em>[
<strong>=
</strong><em>value
</em>]
54 <strong>-h
</strong><em>hostname
</em>[
<strong>:
</strong><em>port
</em>]
69 <strong>-o
</strong><em>option
</em>[
<strong>=
</strong><em>value
</em>]
84 <h2 id=
"lp-1.description">Description
</h2>
85 <p><strong>lp
</strong> submits files for printing or alters a pending job.
86 Use a filename of
"-
" to force printing from the standard input.
88 <h3 id=
"lp-1.description.the-default-destination">The Default Destination
</h3>
89 <p>CUPS provides many ways to set the default destination. The
<strong>LPDEST
</strong> and
<strong>PRINTER
</strong> environment variables are consulted first.
90 If neither are set, the current default set using the
91 <a href=
"lpoptions.html"><strong>lpoptions
</strong>(
1)
</a>
93 command is used, followed by the default set using the
94 <a href=
"lpadmin.html"><strong>lpadmin
</strong>(
8)
</a>
98 <h2 id=
"lp-1.options">Options
</h2>
99 <p>The following options are recognized by
<em>lp
</em>:
101 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>--
</strong><br>
102 Marks the end of options; use this to print a file whose name begins with a dash (-).
104 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-E
</strong><br>
105 Forces encryption when connecting to the server.
107 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-U
</strong><em>username
</em><br>
108 Specifies the username to use when connecting to the server.
110 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-c
</strong><br>
111 This option is provided for backwards-compatibility only. On systems that support it, this option forces the print file to be copied to the spool directory before printing.
112 In CUPS, print files are always sent to the scheduler via IPP which has the same effect.
114 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-d
</strong><em>destination
</em><br>
115 Prints files to the named printer.
117 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-h
</strong><em>hostname
</em>[
<strong>:
</strong><em>port
</em>]
<br>
118 Chooses an alternate server.
119 Note: This option must occur before all others.
121 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-i
</strong><em>job-id
</em><br>
122 Specifies an existing job to modify.
124 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-m
</strong><br>
125 Sends an email when the job is completed.
127 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-n
</strong><em>copies
</em><br>
128 Sets the number of copies to print.
130 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o
"</strong><em>name
</em><strong>=
</strong><em>value
</em>[ ...
<em>name
</em><strong>=
</strong><em>value
</em>]
<strong>"</strong><br>
131 Sets one or more job options.
132 See
"COMMON JOB OPTIONS
" below.
134 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-q
</strong><em>priority
</em><br>
135 Sets the job priority from
1 (lowest) to
100 (highest).
136 The default priority is
50.
138 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-s
</strong><br>
139 Do not report the resulting job IDs (silent mode.)
141 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-t
"</strong><em>name
</em><strong>"</strong><br>
144 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-H
</strong><em>hh:mm
</em><br>
146 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-H hold
</strong><br>
148 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-H immediate
</strong><br>
150 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-H restart
</strong><br>
152 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-H resume
</strong><br>
153 Specifies when the job should be printed.
154 A value of
<em>immediate
</em> will print the file immediately, a value of
<em>hold
</em> will hold the job indefinitely, and a UTC time value (HH:MM) will hold the job until the specified UTC (not local) time.
155 Use a value of
<em>resume
</em> with the
<em>-i
</em> option to resume a held job.
156 Use a value of
<em>restart
</em> with the
<em>-i
</em> option to restart a completed job.
158 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-P
</strong><em>page-list
</em><br>
159 Specifies which pages to print in the document.
160 The list can contain a list of numbers and ranges (#-#) separated by commas, e.g.,
"1,
3-
5,
16".
161 The page numbers refer to the output pages and not the document's original pages - options like
"number-up
" can affect the numbering of the pages.
163 <h3 id=
"lp-1.options.common-job-options">Common Job Options
</h3>
164 <p>Aside from the printer-specific options reported by the
165 <a href=
"lpoptions.html"><strong>lpoptions
</strong>(
1)
</a>
167 command, the following generic options are available:
169 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o job-sheets=
</strong><em>name
</em><br>
170 Prints a cover page (banner) with the document.
171 The
"name
" can be
"classified
",
"confidential
",
"secret
",
"standard
",
"topsecret
", or
"unclassified
".
173 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o media=
</strong><em>size
</em><br>
174 Sets the page size to
<em>size
</em>. Most printers support at least the size names
"a4
",
"letter
", and
"legal
".
176 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o number-up=
</strong>{
<em>2|
4|
6|
9|
16</em>}
<br>
177 Prints
2,
4,
6,
9, or
16 document (input) pages on each output page.
179 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=
4</strong><br>
180 Prints the job in landscape (rotated
90 degrees counter-clockwise).
182 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=
5</strong><br>
183 Prints the job in landscape (rotated
90 degrees clockwise).
185 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o orientation-requested=
6</strong><br>
186 Prints the job in reverse portrait (rotated
180 degrees).
188 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-as-raster
</strong><br>
189 Prints the job as raster.
191 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=
3</strong><br>
193 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=
4</strong><br>
195 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o print-quality=
5</strong><br>
196 Specifies the output quality - draft (
3), normal (
4), or best (
5).
198 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=one-sided
</strong><br>
199 Prints on one side of the paper.
201 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=two-sided-long-edge
</strong><br>
202 Prints on both sides of the paper for portrait output.
204 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>-o sides=two-sided-short-edge
</strong><br>
205 Prints on both sides of the paper for landscape output.
207 <h2 id=
"lp-1.environment">Environment
</h2>
208 <p>The following environment variables override the default destination:
210 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>LPDEST
</strong><br>
211 Specifies the default print queue (System V standard).
213 <p style=
"margin-left: 2.5em; text-indent: -2.5em;"><strong>PRINTER
</strong><br>
214 Specifies the default print queue (Berkeley standard).
216 <h2 id=
"lp-1.conforming-to">Conforming To
</h2>
217 <p>Unlike the System V printing system, CUPS allows printer names to contain any printable character except SPACE, TAB,
"/
", or
"#
".
218 Also, printer and class names are
<em>not
</em> case-sensitive.
220 <p>The
<em>-q
</em> option accepts a different range of values than the Solaris lp command, matching the IPP job priority values (
1-
100,
100 is highest priority) instead of the Solaris values (
0-
39,
0 is highest priority).
222 <h2 id=
"lp-1.examples">Examples
</h2>
223 <p>Print two copies of a document to the default printer:
229 <p>Print a double-sided legal document to a printer called
"foo
":
232 lp -d foo -o media=legal -o sides=two-sided-long-edge filename
235 <p>Print a presentation document
2-up to a printer called
"bar
":
238 lp -d bar -o number-up=
2 filename
240 <h2 id=
"lp-1.see-also">See Also
</h2>
241 <a href=
"cancel.html"><p><strong>cancel
</strong>(
1),
</a>
243 <a href=
"lpadmin.html"><strong>lpadmin
</strong>(
8),
</a>
245 <a href=
"lpoptions.html"><strong>lpoptions
</strong>(
1),
</a>
247 <a href=
"lpq.html"><strong>lpq
</strong>(
1),
</a>
249 <a href=
"lpr.html"><strong>lpr
</strong>(
1),
</a>
251 <a href=
"lprm.html"><strong>lprm
</strong>(
1),
</a>
253 <a href=
"lpstat.html"><strong>lpstat
</strong>(
1),
</a>
255 CUPS Online Help (
<a href=
"http://localhost:631/help">http://localhost:
631/help
</a>)
257 <h2 id=
"lp-1.copyright">Copyright
</h2>
258 <p>Copyright
© 2020-
2024 by OpenPrinting.