Print at the commandline

You can quickly sent text or configuration files to the printer using the lp command. For example, to print the /etc/fstab configuration file, you would type lp /etc/fstab. The formatting of the printed page is rough (no margins, and Courier font used) but it's OK for quick hard copy viewing. If you want you can set a top page margins using the -o page-top= command option. The following will print the same file with a one-inch (72 pica) margin at the top: $ lp -o page-top=72 /etc/fstab

Note that for the lp command to work, you'll need to first make your printer the system default (even if it's the only one attached). To do so, click System ^ Preferences ^ Default Printer. Select your printer and then click Set Default. Then click Close.

Was this article helpful?

0 0

Post a comment