Objective 2: Manage Printers and Print Queues
Printing documents is a slow and error-prone process. Printers accept data in small amounts; they run out of paper, jam, and go offline for other reasons. Printers also must accept requests from multiple system users. As a result, by design, the end user is isolated from printing functions on most computer systems. This isolation comes in the form of a print queue, which holds print requests until the printer is ready for them. It also manages the order in which print jobs are processed.
Linux systems typically use a family of printing utilities developed for BSD Unix. This Objective describes printer management using the lpd daemon. The companion commands lpr, lpq, and lprm are SUID programs, which run with privileges of the superuser. This is necessary to allow their use by all users, because they manipulate files in the protected print spooling directories. lpr is covered in the Objective 3 section. Filters and /etc/printcap are covered in the Objective 4 section.
Linux Printing Overview
On Linux, the default printing system is derived from the BSD Unix printing system. It consists of the following elements:
- lpd
The lpd daemon is started at boot time and runs constantly, listening for print requests directed at multiple printers. When a job is submitted to a print queue, lpd forks a copy of itself to handle jobs on that queue. The copy exits when the queue is emptied. Thus, during idle periods, one lpd process will be running ...
Get LPI Linux Certification in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.