Printing Using Unix

 
 

Checking Printer Queues
Default Printer
Printing to Another Printer
Printing Problems
Removing a Print Job

More Information


Default Printer

In order to print files using Unix, you have to use the Unix command "lpr".  Thus, for example, if you have a file called "data.dat" and you type "lpr data.dat " at the Unix prompt, the output
will appear at the default printer.  However, because we have numerous printers in different locations it is not possible for the system to determine which printer you would like to use and so the default printer is undefined.

You may wish to define the default printer, for example, if you intend to send the majority of your documents to the same printer.  To to this, use the following command :
 

% setenv PRINTER printername


where printername is obtained from the value under "Sun Queue" on this page.  You may wish to add this command to your $HOME/.cshrc file so that it is executed each time you create a new session.
 

Printing to Another Printer

In all likelihood, you may wish to send some document to a different printer.  The way to do this is to specify the name of a particular printer when you type the "lpr" command, by using the "-P" option with the printer's name.  For example, if you want to print to "jkt_laser", type the command :
 

% lpr -Pjkt_laser data.dat
where "data.dat" is the name of the file that you would like to print.
 

Printing Problems

If your print job has not been printed in a reasonable amount of time (couple of minutes), please DO NOT send it repeatedly.  There are a number of tasks that you can perform yourself to determine the state of your print job.
 

  1. Check the "READY" and "On-Line" light on the printer.  These should both be on.  If not, press the "On Line" button.  If the printer display indicates an error, please seek assistance from a knowledgeable individual.
  2. Checking Printer Queues.  If the queue seems excessively long, seek assistance.
  3. Make sure the correct printer destination was specified.
  4. If the printer is not printing, switch it off, leave it off for a few seconds then switch it back on.
  5. Additional trouble shooting information is available here.


Checking Printer Queues

If several jobs are sent to a printer, the first one received starts to print immediately and the remaining are placed in a queue.  To see a  list of jobs in the queue use the command lpq.:
 

% lpq
or
% lpq -Pjkt_laser


Remember that if you do not use the "-P" option the queue displayed will be the queue for the default printer.
 

Removing Jobs from  the Print Queue

In order to remove a print job from the printer queue you must be the owner.
 

% lprm -Pwht_laser 572
wht_laser-572: cancelled

 

To remove all of your jobs from a specific printer queue, use a '-' as the job number.

        % lprm -Pwht_laser -
 
 

More Information

For further information about basic printing commands see:

        man lpr
        man lpq
        man lprm