Dept Banner
Dept Banner

Computing Documentation


Printing a file

Click here to learn how to set a default printer.

In Hill Center we have three printers available for general use:

  • lp29 - Hill 319
  • lp59 - Hill 531
  • lp69 - Hill 601

To print from Unix/Linux use the command lpr. The syntax for the lpr command is

lpr -P<printer> filename
To print a file, named for example, on the printer in Hill 319, type

lpr -Plp29
The option -P indicates that you are specifying a specific printer and lp29 is the name of the printer in Hill 319. To use the printer in Hill 531, you would substitute lp59 for lp29.

To see a current list of printers (and print queues) available to you type lpstat -p at a shell prompt. Please note that this list does not show all of the printers available in the department.

Printing ordinary text, PostScript (.ps), and Encapsulated PostScript (.eps) are quite easy and are all done in the manner described above. To print a .dvi file, one needs to first use the dvips command to convert the .dvi file to a .ps file before sending it to the printer. For example:

dvips -Plp29 paper.dvi
will send the PostScript output of the file paper.dvi directly to the printer lp29. An alternative is to use the command

dvips paper.dvi -o
which creates a version of the same file but in PostScript form. This file can then be printed using the lpr command as shown above.

On the Mathematics Department printers lp29, lp59, and lp69, the default is double sided printing. To print single-sided, the "-S" option is used. For example,

lpr -S -Plp29
will generate single-sided output of the file on lp29.

Mathematics Department printers also default to using a "header page" to help identify a user's job after it is printed and lying in the tray. This is meant to provide a seperator to keep jobs separated and easily identifiable. However, there are times when you may wish to omit the header page. That is done, using the '-h' option. For example:

lpr -h -Plp29

will print the file on lp29 without the normal header page.

Please adhere to these guidelines to improve the use of Mathematics Department printers:


  • If you send jobs to lp29, lp59, or lp69, it is expected that you will be responsible for these jobs until they are printed. This means that you should check the progress of your job (perhaps several times) by typing for example lpq -Plp29 to see if the printer is stuck. If the printer has a paper jam or if it is not printing but gives no error message (such as out of paper), please call the operator at extension 5-2443 or send email to operator@math and report the problem. As a courtesy to others, you should pick up your job shortly after printing. If you have printed a long job, check to see that there is still enough paper in the printer. If you send a job to the printer and find that you can not attend to it, you should remove it from the queue by typing lprm -Pprintername jobnumber, where jobnumber is the number of your job shown when you type lpq -Plp29.


  • Please do not print multiple copies of jobs on lp29, lp59, or lp69. Print a single copy and use the copying machine.


  • Please avoid printing entire TeX documents when only a few changes are required. See section Tex for the use of dviselect or dvips to print selected pages of a document, while maintaining the original page numbering.

The MATHEMATICS DEPARTMENT must pay for paper usage with real money, so please avoid excessive printing. In particular, the Department is strongly encouraging the use of web pages to make information available to students, rather than providing hard copy. See webpages.html for details.


Setting a default printer on the Linux machines

All machines in the Mathematics Department, in general, are set to use lp29 as their default printer. Since you may be closer to other printers, such as lp59 or lp69, or even a networked printer in their office, you may wish to change the default printer for your machine.

Simply type the command "lpoptions -d printername", without the quotes, on the command line of any shell currently running on the machine whose default printer you would like to change to printername, i.e. lp69. An example would be:

lpoptions -d lp69

The lpoptions command simply affects printer options for the current user, storing them in a file /.cups/lpoptions in your home directory. It is unique to CUPS, and as such, only applies to the Linux machines at present.

Contact Us

HillCenter small

Department of Mathematics

Department of Mathematics
Rutgers University
Hill Center - Busch Campus
110 Frelinghuysen Road
Piscataway, NJ 08854-8019, USA

Phone: +1.848.445.2390
Fax: +1.732.445.5530