lp
Print files
TLDR
Print the output of a command to the default printer (see lpstat command)
Print a file to the default printer
Print a file to a named printer (see lpstat command)
Print n copies of a file to the default printer
Print only certain pages to the default printer (print pages 1, 3-5, and 16)
Resume printing a job
SYNOPSIS
lp [options] [file ...]
PARAMETERS
-d PRINTER
Print to specified printer
-n COPIES
Number of copies to print
-o OPTION=VALUE
Set print option
-P PAGES
Print specific pages (e.g., 1-4,7)
-q PRIORITY
Set job priority (1-100)
-t TITLE
Set job title
-H HOLD
Hold job until specified time
-i JOBID
Modify existing job
-m
Send email on completion
-U USERNAME
Print as specified user
DESCRIPTION
lp is the standard command to submit print jobs to printers managed by CUPS (Common Unix Printing System). It queues files for printing and provides options to control print quality, number of copies, page selection, and other print job attributes.
CAVEATS
Requires CUPS to be installed and running. Printer must be configured. Some options depend on printer capabilities. Network printers may have delays.
COMMON OPTIONS
-o sides=two-sided-long-edge - Duplex printing
-o media=A4 - Paper size
-o landscape - Landscape orientation
-o fit-to-page - Scale to fit page


