Take the 2-minute tour ×

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

share|improve this question
add comment

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
share|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. –  Kurt Pfeifle Jul 31 '10 at 17:41
add comment

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...)

share|improve this answer
add comment

Your Answer


