LP command with multiple printers

MHMKD

New Member
Joined
Apr 2, 2021
Messages
1
Reaction score
0
Credits
12
Hello, can I preview all printers using lp command before choosing which one I want to use to print ?
for example when I type LP command I want the system to show me all printers defined in the system and then I will choose which one I want to use.
Thank you very much
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,318
Reaction score
1,870
Credits
8,314
Try this:
Bash:
lpstat -p -d
That should list all printers and show the name of the default printer.

Without having my laptop handy, I think to specify the printer to use, you would do something like this:
Bash:
lp -d printerName /path/to/file
Where printerName is the name of the printer you want to use and /path/to/file is the path to the file to print.

Edit:
A quick bit of DuckDuckGo-fu yielded this:
Which also backs up what I’ve just recommended!
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top