printer setup for unix/linux
on department-managed computers
department-managed computers running unix/linux should already have all of the department printers pre-configured for immediate use.
in any unix/linux cli shell prompt:
- type "
lp -d <printer> myfile.txt
" (substitute the name of the department printer for<printer>
as in "lp -d p2331 myfile.txt
", etc.) - type "
lpr -p<printer> myfile.txt
" (substitute the name of the department printer for<printer>
as in "lpr -pp2331 myfile.txt
", etc.)
in any unix/linux gui application:
- go to the "
file
" menu and select the "print...
" option. - in the "
printer:
" popup menu on top, select the department printer you want to print to.
on self-managed computers
your computer/device must be connected to a ucsd wired/wireless network in order to print or you will get errors about being unable to connect to the printer. for wifi, you must be connected to the "ucsd-protected" wifi. printing will not work while connected to the "eduroam" or "ucsd-guest" wifi networks.
to configure your own computer to print to a department printer, follow the below instructions:
quick printer setup
- protocol: lpd/lpr
- printer address: (see department printers list for desired printer, enter the printer's ip address ("172.16.145.91", etc.) or hostname ("math-prn-p6016.ucsd.edu", etc.)
- printer name: p6016 (or color6016, etc.)
- driver/ppd: hp laserjet 600 m601 m602 m603 (or hp laserjet 500 color m551, etc.)
- installable options: duplex unit = on, tray 3 = hp 500-sheet input tray
detailed printer setup
for cups cli
- login as "root" or a user account with sudo administrator privileges.
- open a new cli shell prompt by launching terminal.app, xterm, or a similar program.
- for the black-&-white printers, copy-and-paste the following lines (change "p2331" to the printer you prefer to use):
lpadmin -p p2331 \
-v "lpd://math-print.ucsd.edu/p2331" \
-o printer-is-shared=false \
-e - for the color printers, copy-and-paste the following lines (change "color2331" to the printer you prefer to use):
lpadmin -p color2331 \
-v "lpd://math-print.ucsd.edu/color2331" \
-o printer-is-shared=false \
-e -
to show printer queue status, type "lpstat -o p2331" or "lpstat -p p2331" or "lpr -pp2331" to show printer queue status.
- that's it! now go print something useful. try "lp -d p2331 myfile.txt" or "lpr -pp2331 myfile.txt".
- to print double-sided on duplex-enabled printers, try "lp -d p2331 -o sides=two-sided-long-edge myfile.txt"
extra
- to delete a printer (change "p2331" to the printer you want to delete):
lpadmin -x p2331
- for ubuntu linux, you can add in the following extra flags before the last "-e" flag in the above lpadmin command to specify the correct ppd and printer options:
for b&w printers (e.g. p2331, etc.):-m "postscript-hp:0/ppd/hplip/hp/hp-laserjet_600_m601_m602_m603-ps.ppd" \
-o hpoption_tray3=hp500sheetinputtray \
-o hpoption_duplexer=true \
for color printers (e.g. color2331, etc.):-m "postscript-hp:0/ppd/hplip/hp/hp-laserjet_500_color_m551-ps.ppd" \
-o hpoption_tray3=true \
-o hpoption_duplexer=true \
- for centos linux, you can add in the following extra flags before the last "-e" flag in the above lpadmin command to specify the correct ppd and printer options:
for b&w printers (e.g. p2331, etc.):-m "lsb/usr/hp/hp-laserjet_600_m601_m602_m603-ps.ppd.gz" \
-o hpoption_tray3=hp500sheetinputtray \
-o hpoption_duplexer=true \
for color printers (e.g. color2331, etc.):-m "lsb/usr/hp/hp-laserjet_500_color_m551-ps.ppd.gz" \
-o hpoption_tray3=true \
-o hpoption_duplexer=true \
for ubuntu linux gui
- login as "root" or a user account with sudo administrator privileges.
- coming soon...
for centos linux gui
- login as "root" or a user account with sudo administrator privileges.
- coming soon...
old - old detailed printer setup - do not use
detailed printer setup
for cups cli
- login as "root" or a user account with sudo administrator privileges.
- open a new cli shell prompt by launching terminal.app, xterm, or a similar program.
- for the black-&-white printers, copy-and-paste the following lines (change "p2331" to the printer you prefer to use):
lpadmin -p p2331 \
-v "lpd://math-print.ucsd.edu/p2331" \
-o printer-is-shared=false \
-e - for the color printers, copy-and-paste the following lines (change "color2331" to the printer you prefer to use):
lpadmin -p color2331 \
-v "lpd://math-print.ucsd.edu/color2331" \
-o printer-is-shared=false \
-e - type "lpq -pp2331". it should return back that "p2331 is ready".
- that's it! now go print something useful. try "lpr -pp2331 myfile.txt".
extra
- to delete a printer (change "p2331" to the printer you want to delete):
lpadmin -x p2331
- for ubuntu linux, you can add in the following extra flags before the last "-e" flag in the above lpadmin command to specify the correct ppd and printer options:
for b&w printers (e.g. p2331, etc.):-m "postscript-hp:0/ppd/hplip/hp/hp-laserjet_600_m601_m602_m603-ps.ppd" \
-o hpoption_tray3=hp500sheetinputtray \
-o hpoption_duplexer=true \
for color printers (e.g. color2331, etc.):-m "postscript-hp:0/ppd/hplip/hp/hp-laserjet_500_color_m551-ps.ppd" \
-o hpoption_tray3=true \
-o hpoption_duplexer=true \
- for centos linux, you can add in the following extra flags before the last "-e" flag in the above lpadmin command to specify the correct ppd and printer options:
for b&w printers (e.g. p2331, etc.):-m "lsb/usr/hp/hp-laserjet_600_m601_m602_m603-ps.ppd.gz" \
-o hpoption_tray3=hp500sheetinputtray \
-o hpoption_duplexer=true \
for color printers (e.g. color2331, etc.):-m "lsb/usr/hp/hp-laserjet_500_color_m551-ps.ppd.gz" \
-o hpoption_tray3=true \
-o hpoption_duplexer=true \
for ubuntu linux gui
- login as "root" or a user account with sudo administrator privileges.
- coming soon...
for centos linux gui
- login as "root" or a user account with sudo administrator privileges.
- coming soon...