Printing from the Command Line

In the command line mode, various printer driver parameters can be specified from the command line without using the GUI. If you want to print a file directly from the command line, use the following lpr command.
$ lpr -P [Printer Name] [File Name]
NOTE
When printing is executed from a terminal interface command line, printing is performed immediately without the settings window being displayed.
Various printer options can be specified by combining keywords (e.g. "Collate") and parameters included in the PPD file for the relevant printer, as shown below, after the -o option. For details about the keywords and parameters for printer options, see "Print Settings from the Command Line".
$ lpr -P [Printer Name] [File Name] -o [Option]=[Parameter]
1.
Start the console.
The method for starting the console differs according to the operating system/distribution used.
2.
Enter the lpr/lp command as follows.
Example: From the printer called LBP7110C, print the file sample.ps:
$ lpr -P LBP7110C sample.ps
NOTE
Specify printer options (option) and parameters (value) after -o (option) as "option name = value".
If the printer name is omitted, the default printer will be used.
Supported print options, parameters, and combinations thereof differ according to the type of printer used.
If no options are specified or there is an error in a specified option, the option is ignored and print processing is executed using the default options and settings.
5717-017