Printing from the command line

There are multiple ways to print from the command line:

Example: You have a print queue (“lab_printer”) that is currently set to print only single-sided pages, and you need to print a two-sided report. You can specify the change on the command line.

  1. Determine if the print queue supports the feature you want to use (in this case, duplex printing), and enter the appropriate command.

    # lsqueue_opts -q lab_printer

    The screen then reads:

    duplex

    none (default)

     

    short_edge

     

    long_edge

     

    current


  2. Find the property name and value that controls duplexing. For this example you want to use duplex=long_edge.

  3. If you are printing from Sun Solaris, HP-UX, IBM AIX, or Linux with CUPS, enter the following on the command line:

    # lp -d lab_printer -o duplex=long_edge my_report.ps

    If you are printing from Linux using the LPRng print subsystem, enter the following on the command line: