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 at the command line.

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

    # /usr/dellprint/bin/lsqueue_opts -q lab_printer

    The screen then reads:

    duplex

    none (default)

     

    short_edge

     

    long_edge

     

    printer setting


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

  3. If you are printing from Sun Solaris, HP-UX, IBM AIX, or Linux with CUPS, type the following at 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, type the following at the command line:

    # lpr -P lab_printer -C "lexopts:duplex=long_edge" my_report.ps