Go to main content

Configuring and Managing Printing in Oracle® Solaris 11.4

Exit Print View

Updated: August 2019

Print Administration Commands

This section describes additional commands to manage printing after you have completed printer setup.

Verifying Printer Status

The lpstat command displays information about accessible printers and jobs.

$ lpstat [-d] [-l] [-p printer(s)] [-t]

Shows the current default printer.

–p [printer(s)

Shows printers that are enabled or disabled for printing.

Separate multiple printer names with commas. If you do not specify a printer, the status of all printers is displayed.


Lists printers, classes, or jobs.


Shows status information about CUPS, including the status of all printers, for example whether printers are active and accepting print requests.

The following example shows the status of printers asteroid and luna with regards to their ability to accept print jobs:

$ lpstat -p "asteroid, luna" -d
printer asteroid faulted. enabled since Jan 5 11:35 2011. available.
unable to print: paper misfeed jam

Description: Printer by break room
printer luna is idle. enabled since Jan 5 11:36 2011. available.
Description: Printer by server room.

The following command displays a long list of information about the printer luna:

$ lpstat -l -p luna
printer luna is idle.  enabled since September 29, 2011 05:20:57 PM BST
Form mounted:
Content types: any
Printer types: unknown
Description: luna
Alerts: none
Connection: direct
On fault: no alert
After fault: continue
Users allowed:
Forms allowed:
Banner required
Charset sets:
Default pitch:
Default page size:
Default port settings:

Sending Print Jobs

To send a print job request to a printer, use either the lp or lpr command.

$ lp|lpr [-d printer] filename

For the lp or lpr command, the –d option specifies the destination printer other than the default printer.

For example, the following print job is being sent to the printer luna, but the default is printer is saturn.

$ lp -d luna abc.ps
request id is luna-1 (1 file(s))

$ lpstat -d
system default destination: saturn

For other options you can use with either command, see the lp(1) and the lpr(1) man pages.

Listing Available Drivers and Devices

The lpinfo command lists the available devices and drivers known to the CUPS server:

$ lpinfo [-m] [-v]

The –m option lists available drivers while the –v option lists available devices. Other options enable you to further filter the list. See the lpinfo(8) man page.

This example is an extract of the list of all available Xerox printers:

$ lpinfo --make-and-model Xerox -m
foomatic:Xerox-2700_XES-xes.ppd Xerox 2700 XES Foomatic/xes
foomatic:Xerox-3700_XES-xes.ppd Xerox 3700 XES Foomatic/xes
foomatic:Xerox-4045_XES-xes.ppd Xerox 4045 XES Foomatic/xes
Xerox Able 1406 - CUPS+Gutenprint v5.2.4
Xerox Able 1406 - CUPS+Gutenprint v5.2.4 Simplified

The following example displays all available devices:

# lpinfo -v
network lpd
network socket
network http
network ipp
direct hal
direct hp
direct hpfax
network RAW

How to Delete a Printer and Remove Printer Access

  1. Become an administrator on a print client with access to the printer to delete.

    To become an administrator, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  2. On the system that is the print client, delete information about the printer.
    $ lpoptions -x printer-name

    Note -  The –x option only removes the default options for a specific printer and instance. The original print queue still remains until it is deleted by using the lpadmin command.
  3. Become an administrator on the system that serves as the print server.
  4. Stop accepting print requests for the printer.
    $ cupsreject printer-name

    This step prevents any new requests from entering the printer's queue while you are in the process of removing the printer.

  5. Stop the printer.
    $ cupsdisable printer-name
  6. Delete the printer.
    $ lpadmin -x printer-name
  7. On both print server and client, verify that the printer has been deleted with the following command:
    $ lpstat -l -p printer-name