lpr
system administrationLinux/Unix
The lpr command is one of the most frequently used commands in Linux/Unix-like operating systems. lpr Print files
Quick Reference
Command Name:
lpr
Category:
system administration
Platform:
Linux/Unix
Basic Usage:
lpr [options] [arguments]
Common Use Cases
Syntax
lpr [options] [file...]
Options
Option | Description |
---|---|
-# num |
Print num copies |
-C class |
Job classification for banner page |
-h |
Suppress printing of banner page |
-J name |
Job name for banner page |
-m |
Send email when job is complete |
-o option |
Specify printer-specific options (CUPS) |
-P printer |
Send output to the specified printer |
-r |
Remove files after printing |
-T title |
Title for pr (when used with -p) |
-p |
Format with pr before printing |
-l |
Raw print (no filtering or post-processing) |
-U username |
Print as the specified user |
-q |
Quiet mode |
Examples
How to Use These Examples
The examples below show common ways to use the lpr
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
lpr document.txt