LinuxCommandLibrary

lp

prints files to a printer

TLDR

Print file

$ lp [file.pdf]
copy
Print to specific printer
$ lp -d [printer_name] [file]
copy
Print multiple copies
$ lp -n [3] [file]
copy
Print double-sided
$ lp -o sides=two-sided-long-edge [file]
copy
Print specific pages
$ lp -o page-ranges=[1-5] [file]
copy
Print from stdin
$ cat [file] | lp
copy

SYNOPSIS

lp [options] [files]

DESCRIPTION

lp prints files to a printer. It's the System V print command used with CUPS.
The tool submits print jobs to the print queue. Options control copies, pages, and print quality.

PARAMETERS

FILES

Files to print.
-d PRINTER
Destination printer.
-n COPIES
Number of copies.
-o OPTION
Printer option.
-P PAGES
Page list to print.
-q PRIORITY
Job priority (1-100).
--help
Display help information.

CAVEATS

Requires CUPS. Printer must be configured. Options vary by printer.

HISTORY

lp is the System V print command, now implemented by CUPS as the standard Linux/macOS print interface.

SEE ALSO

lpr(1), lpq(1), lprm(1), lpoptions(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community