3

So, I'm pretty new to Ubuntu and basically I'm trying to use a printer via the Ubuntu termial, but I don't know how to do that.

I found on the web some commands that could do the job but I don't know how to configure the printer.

For example this one:

lp -d PRINTER_NAME PDF_FILES

I think I must need to install the drivers or something but I'm not sure if it works as in Windows or not.

Can anyone help me?

Just for the record, the printer is a Xerox.

2 Answers2

1

It was much easier than I thought. I just had to search for "Printers" in the Ubuntu dash, clicked "Add", searched for network printers, clicked on mine, and voila. That's pretty much it.

Then I just used the following command and everything worked great:

lp -d PRINTER_NAME PDF_FILES
TheSchwa
  • 3,860
1

TL;DR Use your default printer with:

lp filename

To specify a default printer or use specific printer, list all printers with

lpstat -p -d

eg:

% lpstat -p -d
printer HP-LaserJet-1200 is idle.  enabled since Sa 06 Jun 2015 20:26:19 CEST
printer HP_Color_LaserJet_CP1514n is idle.  enabled since Do 21 Mai 2015 21:02:54 CEST
printer HP_LaserJet_1200 is idle.  enabled since Sa 30 Mai 2015 18:53:31 CEST
system default destination: HP_LaserJet_1200

Print with

lp -d printer filename

eg:

lp -d HP_LaserJet_1200 mypdf.pdf

Set a default printer

lpoptions -d printer

eg:

lpoptions -d HP_Color_LaserJet_CP1514n
A.B.
  • 92,125