Linux command lpadmin will set the default printer. How does one show what the default printer is from the command line?

link|improve this question

52% accept rate
feedback

2 Answers

up vote 0 down vote accepted

To get information about your current configuration use

$ lpoptions

The field your question is about is probably printer-info.

Btw, lpq prints the default printer, too.

$ lpq
Apple2 is ready
no entries
link|improve this answer
lpoptions | grep -o 'printer-info[^ ]*' – Dennis Williamson Mar 26 '10 at 16:07
Wrong! The 'printer-info' field is just a comment, and it appears for every single printer (even if it's empty). Has nothing to do with default printer. – pipitas Jul 31 '10 at 17:41
feedback

lpstat -d shows you the default printer (if your system uses CUPS).

(Above advice is completely wrong. 'printer-info' has nothing to do with default or not default printer queue. It's just a field to hold a comment about the queue. Can contain anything you like...)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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