Thursday, September 5, 2013

Install/add network printer to your system list in linux through command line

Initially check if CUPS (Common Unix Printing System) daemon is running or not using this command:

$$ /etc/init.d/cups status

You will see something like this on your terminal:

$$ cupsd (pid ****) is running...

If the daemon is not running, then start the daemon using these commands:

$$ /etc/init.d/cups start
$$ chkconfig cups on

To add the network printer, use this command:

$$ lpadmin -p Printer_name -E -v socket://


To set a default printer:

$$ lpadmin -d  Printer_name

To check the printer status and see if printer is in ready mode:

$$ lpq

 You see something like this when your printer is ready and there are no entries:

$$ Printer_name  is ready
$$ no entries

To check the printers installed on your machine, you can use this command:

$$ lpstat -p -d

If you want to delete a printer on your machine:

$$ lpadmin -x Printer_name




**part of this has been taken from http://sumitgoel.me

No comments: