Printing

Printing subsystem components

Spool directories

AIX:

/var/spool/lpd/qdir and /var/spool/qdaemon

FreeBSD:

/var/spool/output/lpd/*

HP-UX:

/var/spool/lp/request/*

Linux:

/var/spool/lpd/*

Solaris:

/var/spool/lp/requests/*

Configuration file(s)

AIX:

/etc/qconfig

FreeBSD:

/etc/printcap

HP-UX:

/etc/lp/*

Linux:

/etc/printcap

Solaris:

/etc/lp/* and /etc/printers.conf

Boot script configuration

FreeBSD:

/etc/rc.conf: lpd_enable="YES"

HP-UX:

/etc/rc.config.d/lp: LP=1

SuSE Linux:

/etc/sysconfig/printer: DEFAULT_PRINTER=name

The BSD and LPRng Spooling Subsystems

Used by FreeBSD and some Linux systems.

lpq

lpq [-P printer | -a]List the contents of the default queue (no options), specified queue, or all queues.

lprm

lprm [-P printer] listRemove print jobs from a queue. list can contain print-job IDs and/or usernames (remove all jobs owned by the specified user); if list is a single hyphen, all jobs are removed from the specified queue.

lpc

lpc [subcommand args]Administrative utility. Executes the specified subcommand, or enters interactive mode if no subcommand is specified.

Subcommands

status printer

Display status of the line printer daemon and the specified print queue.

start printer

Restart printing on the printer after an abort or stop command.

stop printer

Stop all printing on printer after the current job has finished (new jobs are still accepted).

abort printer

Stop all printing on printer immediately (new jobs are still accepted).

Get Essential System Administration Pocket Reference 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.