Posts Tagged ‘lp’

Printers control from the console

Saturday, January 19th, 2013

A short list of helpful commands for printers’ control.

lpq – shows the default system printer (if set) and its printing queue;
lpstat -a – shows all printers, available in the system, their ‘working since’ time and type of connection (USB/local network, etc);

lpstat -p – shows all printers, available in the system, their ‘working since’ time and type of connection (USB/local network, etc);
lpstat -v – shows all printers, available in the system, their ‘working since’ time and type of connection (USB/local network, etc);

lpadmin -d printer_name – set the printer_name as default system printer;
lpadmin -x printer_name – deletes printer_name printer from the system;
cupsenable printer_name – turns the printer_name printer on on the OS level;
cupsdisable printer_name – turns the printer_name printer off;

cupsctl --share-printers – shares all printers in the system, making them available across the network; and run the next command =>
cupsctl 'BrowseLocalProtocols="all"' – use all protocols of network printing. If you use Linux machines only (both printing server and client), it’s better to type “ipp” instead of “all”. IPP means Internet Printing Protocol.