O'Reilly logo

CompTIA® Linux+ Certification, Powered by LPI, Student Manual by Axzo Press

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

1110 CompTIA Linux+ Certification, Powered by LPI
Topic B: Printing
This topic covers the following CompTIA exam objectives for Linux+ [Powered by
LPI] Certification, LX0-101 and LX0-102 exams.
# Objective
108.4 Manage printers and printing
Basic CUPS configuration (for local and remote printers)
Manage user print queues
Troubleshoot general printing problems
Add and remove jobs from configured printer queues
The following is a partial list of the used files, terms, and utilities:
CUPS configuration files, tools and utilities
/etc/cups
lpd legacy interface (lpr, lprm, lpq)
Printing in Linux
Explanation
Printing is a critical system task. You need to be able to set up printers, manage print
queues, and manage print jobs. Linux supports printing operations via a few system
components, the most popular of which are:
Line Printer Daemon (LPD)
Application-specific printing systems
Common UNIX Printing System (CUPS)
All of these printing subsystems share some common concepts. Notably, each uses the
components described in the following table.
Item Description
Printer The printer is the physical printing device, such as an HP LaserJet printer.
Queue A queue is a holding place for jobs waiting to be printed. Technically a queue is
a temporary file on the server hosting the printer. Depending on your printing
system, it is likely to be something like /var/spool or var/spool/cups.
Job The job is the document being printed. Sending a job to the queue is called
spooling. Sending a job from the queue to the printer is formally called printing,
though that’s also the term you understandably use for the whole process.
Print device The print device is the device file you print to, for example, /dev/lp0.
File sharing and printing 1111
LPD/LPR
The traditional Linux (and UNIX) printing system is the
lpd daemon. This system is
interchangeably called the LPD or LPR (taking its initials from “line printer”) system. It
is now largely replaced by CUPS because of many limitations.
LPD has important security holes, limited support for modern printers, and for the most
part, doesn’t handle graphics well. Various enhancements over the years, including
LPRng and PDQ, attempted to rectify these issues. In most cases, however, the overall
deficiencies remain.
Command Use this command to
lpr
Print documents.
lpc
View the status of printers.
lpq
View print jobs in the queue.
lprm
Remove print jobs from the queue.
Application-specific printing systems
To address the limitations of LPD, some applications provided their own printing
systems. Examples include StarOffice and WordPerfect. While these systems enabled
higher quality printouts that included fonts, colors, and graphics, they were limited to
those applications. For example, you could not print a log file via StarOffice’s printing
system without using StarOffice to open and view the file first.
CUPS
Currently, the most popular and capable printing system is the Common UNIX Printing
System. It is installed by default on most modern distributions and is available as a
package or source download for many other distros.
CUPS addresses the security vulnerabilities of LPD and offers greatly increased
controls for limiting who can print to your printers. It supports the Internet Printing
Protocol (IPP) and is compatible with the Samba component which provides
interoperability with Windows-based networks. Many printer manufacturers have
adopted support for CUPS, giving you a much wider range of printers from which to
choose. However, that selection is still far smaller than it is for Windows and Macintosh
computers.
Configuring CUPS
On most distributions, CUPS is installed by default. Therefore, we won’t cover how to
setup CUPS. Instead, we’ll move directly to configuring printers and managing queues.
Configuration tools
CUPS is very flexible, enabling you to configure print services by editing configuration
files, using GUI tools, or even by loading a special Web page. You can configure most
every setting using any of the methods.

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