Tuesday, 19 June 2012

Linux CUPS terminal printer quick cheatsheet

Adding a new printer without a PPD:  
  • lpadmin -p printer_name -E -v socket://
1. Finding an existing PPD for your printer if required:
  • lpinfo --make-and-model 'LaserJet 3390' -m
2. Copy the require line up to the first space, eg from above command:
  •     Output: gutenprint.5.2://hp-lj_3390/expert HP LaserJet 3390 - CUPS
  •     Used for -m: gutenprint.5.2://hp-lj_3390/expert
3. Adding a new printer with above ppd: 
  • lpadmin -p printer_name -E -v smb://user:pass@ -m gutenprint.5.2://hp-lj_3390/expert
Adding a new printer with a specific ppd: 
  • lpadmin -p printer_name -E -v serial:/dev/ttyS0?baud=115200 -m MyPrinter.ppd
Adding Location (-L) and Description (-D): 
  • lpadmin -p printer_name -L "13th floor" -D "Konica Minolta C250"
Setting printer as default: 
  • lpoptions -d printer_name
Printing a file eg. /etc/hosts: 
  • lpr -P printer_name /etc/hosts
Remove the printer from the system: 
  • lpadmin -x printer_name
View printer state and job list:
  • lpq -P printer_name
View status information for jobs for a specific printer: 
  • lpstat -P printer_name
Purge all jobs for a specific printer: 
  • lprm - -P printer_name
Enabling a stopped printer: 
  • cupsenable printer_name
Disabling a printer: 
  • cupsdisable printer_name
Some of the lpadmin -v types:
  • serial:/dev/ttyS0 (can add baud, eg: serial:/dev/ttyS0?baud=115200)
  • parallel:/dev/lp0
  • smb://user:pass@host/share
  • ipp://host:port/printer_name
  • lpd://host/printer


  1. Come across much innovative topic that peaks my interest. Let me bookmark your website whilst checking you out of mess hp 7640 printer troubleshooting

  2. You-re was ergo terrific! We do not assume I've detected anything like this Right before. Thus excellent to track down a person with some authentic applying for grants that this particular topic. hp 3630 printer offline

  3. A moment dark ink cartridge and diverse shades of dim help keep up an impartial tone, with the dim ink taking into consideration unobtrusive shading and in this way enhancing the nature of high contrast photographs. hp setup

  4. Perpetually logical and an outstanding contribution to the world of bloggers.

  5. amazing !!! good work. keep it up.
    find Best printer for home from here.

  6. They likewise offer further developed taking care of abilities, for example, bigger plate, and may offer duplex (twofold sided) printing, arranging, and stapling.drukowanie 3d

  7. A decent printing machine is the thing that you have to deify workmanship on assortment of surfaces. For those managing around here, here are a few hints that should help in purchasing the correct print machines.cheap postcard printing

  8. The speed of a printer is measured by the number of printed pages per minute (ppm). Inkjet and laser printers have three levels of quality, that is, the project settings, normal and best. cheap 3d printer

  9. The setting up of the wireless color printer relies upon the particular switch producer.best wireless printer

  10. A few printers have the alternative to redesign the memory. It is fitting to purchase everything in one printer with substantial memory limit and more prominent usefulness.