Print Commands Under Unix
There are two different ways to do basic printing, use either the lp or the lpr commands. If you are trying to use more complicated printing functions you will need to use the lp command rather than lpr, or use some of our fancier commands (see below). See either of their manpages (lp or lpr) to see more options and commands, or see our page for printing options specific to the BWs and a larger description of the lp functions.
Note: Only print PostScript or text, all PDFs should be converted to PS.
pdf2ps file.pdf file.ps
Here are a few basic commands that will come in handy for the common user.
|Specify a particular printer||lp -d printername||lpr -P printername|
|Check the print queue||lpstat -d printername||lpq -P printername|
|Cancel a print job||cancel||lprm|
|Print X number of pages||lp -n X||lpr -# X|
For more complicated documents we recommend using commands other than lp or lpr. These are a few that are known to work well.
|enscript||prints text nicely||man_enscript|
|vgrind||prints C/C++ code nicely||man_vgrind|
|psyapp||prints code and text||man_psyapp|
|mp||prints mail and news well||man_mp|
or use gv
|previews PS on the screen
|[Q] - exit
[SPC] - next pg