For basic linux commands, see the printing section of the Linux Quick Start Guide.
If you're currently logged into a machine on the console, i.e. sitting at the computer, then you can select which printer you want from any application. Simply go to the application, select File → Print (Ctrl+P), then you'll be able to select from any of the printers in the department. For printing files from the command-line, see the following sections.
The command to use for printing to our network-attached printers is lpr. This is for printing from the command-line on our Linux machines.
Our dotfiles can currently figure out if you are currently in the Hydra lab and will choose the appropriate printer automatically. However, you can still set your own default printer. Edit your ".zshrc" file and find a section similar to:
# set up printing
elif [[ "'/bin/uname -n'" == hydra* ]]; then
# export PRINTER="mkxxx"
If you want to set your own default printer, remove the comment (the # sign) from the last line and change "mkxxx" to the name of your new default printer. The naming scheme for the printers is "mk###" for printers in the Min Kao Building. The ### is the room number of the printer. There may also be a suffix, like
-color for a color printer or
-mfc for a multi-function copier/printer/scanner/fax.
If you are looking for a commonly used printer, you may want to go to http://printing.eecs.utk.edu:631/classes. This contains a list of printer aliases. For instance, "hydra" is an alias for "mk421", which is the printer in the hydra lab.
If you want to print to a specific printer other than your default printer, you can specify it on the command line. Add a
-P option to your lpr command, where
is the name of the printer you wish to use. For example:
lpr -Phydra test.txt
will print the file test.txt to the printer named hydra.
Perhaps you'd like to print a file in a slightly non-standard way from the command-line. The "-o" option for the lpr allows you to pass printing options to the printer, in a space-separated list. For instance, perhaps you'd like to print on both sides of the paper, or print in landscape mode. This is the list of options that the lp suite of tools accepts, taken from the lp(1) man page:
Sets the page size to size. Most printers support at least the size names "a4", "letter", and "legal".
Prints the job in landscape (rotated 90 degrees).
Prints on one or two sides of the paper. The value "two-sided-long-edge" is normally used when printing portrait (unrotated) pages, while "two-sided-short-edge" is used for landscape pages.
Scales the print file to fit on the page.
Prints multiple document pages on each output page.
Scales image files to use up to number percent of the page. Values greater than 100 cause the image file to be printed across multiple pages.
Sets the number of characters per inch to use when printing a text file. The default is 10.
Sets the number of lines per inch to use when printing a text file. The default is 6.
Sets the page margins when printing text files. The values are in points - there are 72 points to the inch.
For more options, such as printing multiple copies, check out the lpr command.
For more advanced printing techniques, like printing program code, check out our Advanced Linux Printing page.
Knoxville, Tennessee 37996 | 865-974-1000
The flagship campus of the University of Tennessee System