.TH lpadmin "" "" Command
.PC "Administer the lp print-spooler system"
\fBlpadmin [\-d\fIprinter\^\fB]\fR
\fBlpadmin [\-p\fIprinter\^\fB]  [\-v\fIdevice\^\fB] [\-m\fIbackend\^\fB]\fR
\fBlpadmin [\-x\fIprinter\^\fB]\fR
.PP
.HS
.SH Options:
.IC \fB\-d\fIprinter\fR
Make \fIprinter\fR the default system printer
.IC \fB\-m\fIscript\fR
When used with option \fB\-p\fR,
use \fIscript\fR to preprocess text to be printed on \fIprinter\fR
.IC \fB\-p\fIprinter\fR
Use \fIprinter\fR with options \fB\-m\fR or \fB\-v\fR
.IC \fB\-v\fIdevice\fR
Associate \fIdevice\fR (a serial or parallel port) with the
printer with \fB\-p\fR, above
.IC \fB\-x\fIprinter\fR
Delete \fIprinter\fR from the system
.HE
The command
.B lpadmin
administers the
.B lp
print-spooling system.
.PP
Under the
.B lp
spooler, the system administrator gives each printer a name.
She also establishes a script for each class of printers;
for example, she would prepare one script for all Epson printers, and another
for all PostScript printers.
The script lists commands that must be executed to print the text properly,
such as setting the port into the correct mode or post-processing the text;
Finally, she inserts into file
.B /usr/spool/mlp/controls
an entry that links a printer by name with its device and its script.
When a user spools a job for printing, she selects the printer by name.
(She can also use the command
.B route
establish a default printer for herself.)
The print spooler
.B lpsched
reads the information established by the administrator to ensure that
printing is managed correctly.
.PP
The command
.B lpadmin
is designed to make it easy for you to perform these tasks of administration.
With
.BR lpadmin ,
you can add a new printer to your \*(CO system and link it to a device
and a description script.
You can also add or modify a description script,
or drop a printer.
.B lpadmin
recognizes the following options:
.IP \fB\-d\fIprinter\fR 0.75i
Make
.I printer
the default printer for your system.
This is the printer that is used when a user names no printer on the
.B lp
command line and has set no default printer for herself.
.IP \fB\-m\fIscript\fR
Use
.I script
to preprocess all text sent to a given printer.
.I script
is stored in directory
.BR /usr/spool/mlp/backend .
This option is always used with option
.BR \-p .
.IP \fB\-p\fIprinter\fR
Select
.I printer
for definition or change.
This option is used with the options
.B \-m
and
.BR \-v .
.IP \fB\-v\fIdevice\fR
Associate
.I device
(a serial or parallel port) with the printer named in the option
.BR \-p .
.IP \fB\-x\fIprinter\fR
Remove \fIprinter\fR from the system.
.PP
For detailed examples of how to modify the file
.B controls
and how to build a control script for a printer, see the Lexicon entry for
.BR controls .
.SH "See Also"
.Xr "commands," commands
.Xr "controls," controls
.Xr "lp," lp
.Xr "printer" printer
