lp

prints files to a printer

TLDR

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

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.

INSTALL

sudo apt install lprng
sudo dnf install cups-client
sudo apk add cups-client
sudo zypper install cups-client

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)