Solaris Advanced User's Guide

Submitting Print Requests Using a Printer Name

Whether or not a default printer has been designated for your system, you can submit print requests to any printer that is configured for your system. To submit a print request to a specific printer, type the following command.


$ lp -d printername filename

In the previous example, printername is the name of the specific printer and filename is the name of the file you want to print.

The specified file is placed in the print queue of the destination printer, and the request id is displayed.

For example, to print the /etc/profile file on the printer fastprint, type the following command.


$ lp -d fastprint /etc/profile
request id is fastprint-1 (1 file(s))
$ 

If you submit a request to a printer that is not configured on your system, an information message is displayed, as shown in the following example.


$ lp -d newprint /etc/profile
newprint: unknown printer
$ 

See System Administration Guide: Advanced Administration for information on configuring printers. See Determining Printer Status for information about how to find out which printers are available on your system.