Print a File from the Terminal with lp

Send PDFs, text, and images straight to any configured printer.

macOSFilesprintingLow risk
Run lp -d "printer name" followed by the file path to print it immediately.

01Command

Command
$ lp -d "Office_Printer" ~/Documents/report.pdf

02What 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

RiskLow risk
!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 Mac
    Apple Support · vendor-doc · 2026-09-17
    Evidence: Apple documents printing from Mac apps; lp is the command-line path to the same CUPS system.
  • lp – Submit files for printing
    ss64.com · technical · 2026-09-17
    Evidence: lp submits files to CUPS for printing; -d selects a destination printer by name.

Last verified: 2026-09-18 · Category: Files & Folders

06Related solutions