Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The lpr man page says a destination printer can be specified with the -P flag.

-P destination[/instance]
    Prints files to the named printer.

I have 'added' various printers on local Samba shares using the GUI in Ubuntu/Gnome. How can I get a list of these available printers in the format that the -P flag expects (preferably from a bash shell)?

share|improve this question

1 Answer 1

up vote 32 down vote accepted
$ lpstat -p -d

From the CUPS manual.

share|improve this answer
Thank you! I've just found that lpq works too. – Ian Mackinnon Aug 18 '10 at 16:56
Whenever I'm looking for this, I'm also looking for how to pick a default printer: lpoptions -d printername – Joshua Goldberg Oct 26 at 19:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.