O'Reilly logo

Practical Linux by Bill Ball, John Ray, Michael Turner, M. Drew Streib

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spooling Files to Your Printer

Linux uses a modified printing system inherited from the Berkeley Software Distribution (BSD) UNIX operating system. This system is called line-printer spooling. Linux starts printing services by running lpd, the line printer daemon, after you boot. This daemon runs in the background, and waits for program or command-line print requests.

Documents are printed with the lpr command. To print a text document, use the lpr command along with the -P (printer) option to select a desired printer, like this:

$ lpr -Pmylp mydocument

The printer name used with the -P option will be the name of a printer you've defined in your printcap file.

# lpr -Pmylp /usr/share/ghostscript/3.33/examples/tiger.ps

Linux printing automatically ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required