Print From Command Line

Wayne Chen updated September 11 at 3:55 PM

Questions Addressed

  • How do I print via the command line on my Mac?

How to Print from Terminal or XTerm shell on a Mac

First make sure your printer has been added to Print & Fax Preferences in OS X.

Open a Terminal window and enter the following:

>lpr -P PrinterName print

for a list of printers use the command

>lpstat -p

for a list of custom options for each printer use

>lpoptions -p PrinterName -l 


lpoptions -p monet_ucsd_edu -l
  • NOTE: make sure PrinterName matches exactly with the name of the printer as it appear in lpstat

If you need further assistance, please contact IGPP Net Ops.