# How do I get the printer name to include in lpoptions -d

I am trying to set the default printer on a machine running xubuntu from the command line. It looks like I need: lpoptions -d "printer_name" but I do not know the name of the printer. How can I find this information?

Thank you.

-

You can use the command:

lpstat -a


This returns a list of installed printers.

-
thanks for the info but the printer is not currently installed. It looks like what I was looking for was lpinfo -v. –  KennyPeanuts Apr 13 '11 at 1:18

Probably something like lpstat -p or lpstat -a. Some information you might only be able to get by visiting http://localhost:631/printers, though; I don't see a way to get the location or description from the command line offhand.

-
The printer wasn't installed yet. I prob. should have made that more clear in the question. Thanks for the info though. I think lpinfo -v is what I was looking for. –  KennyPeanuts Apr 13 '11 at 1:25
If it's not installed yet, it probably doesn't have a name and you can't do much with it then. –  geekosaur Apr 13 '11 at 2:17
yeah it looks like I was biting off a bit more than I thought when I asked the question. Since @Christi and you essentially answered the question I asked (and not the one in my head) I am accepting the answer from @Christi since I think she was first. Thanks. –  KennyPeanuts Apr 13 '11 at 13:23