LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

lpr

submits print jobs

TLDR

Print file
$ lpr [file]
copy
Print to specific printer
$ lpr -P [printer] [file]
copy
Print multiple copies
$ lpr -# [3] [file]
copy
Print from stdin
$ cat [file] | lpr
copy
Remove file after printing
$ lpr -r [file]
copy
Title for job
$ lpr -T "[title]" [file]
copy

SYNOPSIS

lpr [options] [files]

DESCRIPTION

lpr submits files for printing. It sends one or more files to the default printer or a printer specified with -P. Files are queued and printed in the order submitted.On modern Linux systems, lpr is provided by CUPS (Common Unix Printing System). Without arguments, it reads from stdin, making it useful in pipelines (e.g., `ls | lpr`). Printer options like paper size and duplex can be set with -o.

PARAMETERS

FILES

Files to print.
-P PRINTER
Destination printer.
-# COPIES
Number of copies.
-r
Remove file after printing.
-T TITLE
Job title.
-o OPTION
Printer option.
--help
Display help information.

CAVEATS

Requires CUPS. Use lp for System V style. Options are printer-specific.

HISTORY

lpr originated in BSD Unix as the line printer spooler, now implemented by CUPS.

SEE ALSO

lp(1), lpq(1), lprm(1)

Copied to clipboard
Kai