Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
up vote 5 down vote accepted

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

See for an example of a udev printer rule.

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.