Information Technology Reference
In-Depth Information
The following listing shows using the -d command-line argument to print the
files abc and xyz using the laser2 printer:
# lp -d laser2 abc xyz
request id is laser2-3 (2 files)
#
If a destination printer is not specified, the appropriate default printer is
used. Other commonly used command-line arguments are -n followed by a
number, which specifies the number of copies to print and -o , which is fol-
lowed by printer-specific options.
Default Printers
The two types of default printers are a system default printer and a
user/application-defined default printer. The system default printer is defined
by the administrator and is used as the destination for all print jobs that do
not specify a printer or is overridden by a user/application-defined default
printer. Users or applications can define a default printer using special shell
variables that have been exported to their environment.
The system keeps track of printers using the Printer Alias Database which is
stored in the file /etc/printers.conf . This database is used to record infor-
mation about defined printers.
Setting Up a System Default Printer
The system administrator can specify a system default printer using
admintool or by using the lpadmin command. Only previously defined print-
ers can be identified as a system default printer. The following listing shows
how to define the laser1 printer as the system default printer:
# lpadmin -d laser1
#
The lpadmin command can be used to determine the system default printer
as shown in the following listing:
# lpstat -d
system default destination: laser1
#
The system default printer is recorded as the _ default entry in the
/etc/printers.conf file.
Setting Up a User/Application Default Printer
A user or application can select a printer by specifying a destination printer
with the lp(1) command or by defining either the LPDEST or PRINTER shell
Search WWH ::




Custom Search