4

I have two USB printers. They are assigned a path depending on the order of turning them on. The first one is /deb/usb/lp0 and the second one /deb/usb/lp1. However, I sometimes echo to these printers directly and need to know which one is lp0 and which one is lp1. Can I assign a fixed path in some way?

Thanks!

5
+25

You can write udev-rules to assign different names to the printer, depending on their serial numbers.

See http://www.reactivated.net/writing_udev_rules.html#example-printer for an example of a udev printer rule.

  • 2
    please note that in Ubuntu (at least 10.04 and later) use udevadm info instead of udevinfo. So to check up on your lp0 printer you'd use the command udevadm info --attribute-walk --name /dev/usb/lp0 (note that it generates tons of data) – Guss Apr 15 '11 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy