Printing on Linux

This is a short guide to printing on Linux using shell commands.

Shell Commands

The following commands are available on the shell to print and control print jobs:

Command DescriptionSorted descending Example
lpq Show queued print jobs lpq
lpstat Show all printers lpstat -p
lp Print files lp text.ps
lpoptions List printer options lpoptions
  List options one printer lpoptions -p card-ethz
  Change default printer lpoptions -d card-ethz
cancel Cancel a print job cancel card-ethz-131

Run man <command> in a shell to get more information on each of the commands above.

Content Type

Please note that the printers will detect PostScript and PDF that is printed from command line and print it as such. All other content is printed as text.

Page URL: https://www.isg.inf.ethz.ch/bin/view/Main/HelpPrintingLinux
2024-04-26
© 2024 Eidgenössische Technische Hochschule Zürich