Print a File from the Terminal with lp
Send PDFs, text, and images straight to any configured printer.
Run lp -d "printer name" followed by the file path to print it immediately.
01Command
Command
$ lp -d "Office_Printer" ~/Documents/report.pdf02What it does
Run lpstat -p first to list printer names exactly as CUPS knows them. Options travel like flag/value pairs: -n 3 for three copies, -o sides=two-sided-long-edge for duplex, -o media=A4 for paper size. Plain text and PDFs print natively; for Word or Pages files export to PDF first. Omitting -d prints to the system default printer.
03Risk
!Warning: lp sends the job instantly — there is no app preview, so check the page setup options before printing.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Print documents from your MacEvidence: Apple documents printing from Mac apps; lp is the command-line path to the same CUPS system.
- lp – Submit files for printingEvidence: lp submits files to CUPS for printing; -d selects a destination printer by name.
Last verified: 2026-09-18 · Category: Files & Folders
06Related solutions
Find files larger than 500 MB on Mac
List the biggest files in your home folder that are eating disk space.
Show file extensions for all files on Mac
Make Finder display .pdf, .docx, .png and every other extension at all times.
Find Which Process Has a File or Volume Open with lsof
List every open file descriptor — files, directories, and network sockets — per process.