Printing with Linux

An introduction to printing with Linux

Introduction to printing with Linux

The following is an overview of the process that is undertaken by Linux for printing. We will take a look at printing from the command line with LPD (Line Printer Daemon) and printing with CUPS (Common Unix Printing System). Firstly lets take a look at the process flow that is involved when we create a print:

All printing systems have a printing daemon or a print service at the heart of their system. It is the job of this daemon to accept jobs from either direct print commands or via your network. Once a file or command has been received, it is then processed and passed to a locally attached printer or to another printer service or daemon. (Many larger organisations have dedicated print servers to handle these requests). These print jobs or requests are then held in a print queue until a printer is ready to accept these. If a printer is out of paper or has encountered a paper jam or is out of toner or ink, then the job is normally held on a queue. Quite often this queue is referred to as a spool. The process of sending the jobs to the printer is also called spooling.

Two of the most well known printing systems were originally developed for BSD Unix and SystemV Unix. Although both printing systems can achieve the same end results, they use different commands to achieve this. BSD Unix printing commands include lpc, lpd, lpr and lprm. The SystemV printing system uses the commands lp, enable, disable, cancel, lpstat, and lpadmin. On SystemV based systems you would use the lpadmin command to work with print queues.

Most modern distributions of Linux have CUPS as their default method of printing. CUPS provides support for both SystemV and BSD commands. CUPS runs as a daemon and is automatically started at boot on your system. Although printers can be configured directly from the command line, CUPS has a very capable web interface which allows you to manage all aspects of your printing environment. For a full overview of printing with cups and controlling cups from the command line click Managing Printers with CUPS