System Administration Guide

How to Set a System's Default Printer

  1. Log in as superuser or lp on the system for which you want to set a default printer.

  2. Set the system's default printer by using the lpadmin command.


    # lpadmin -d [printer-name]
    -d printer-name
    

    Name of the printer you are assigning as the system's default printer. If you don't specify printer-name, the system is set up with no default printer.

    The default printer name is entered in the system's /etc/lp/default file.

  3. Check the system's default printer by using the lpstat command.


    $ lpstat -d
    

Example--Setting a System's Default Printer

In the following example, the command sets the printer luna as the system's default printer. This means that luna will be used as the system's default printer if the LPDEST or PRINTER environment variables are not set.


# lpadmin -d luna
# lpstat -d
system default destination: luna