udev-rules

Create persistent udev rules mapping USB devices to stable /dev symlinks.

18|2|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill udev-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: udev-rules
Source: https://github.com/wimblerobotics/ros2-copilot-skills/tree/main/udev-rules
Command: npx skills add https://github.com/wimblerobotics/ros2-copilot-skills --skill udev-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Linux assigns serial device names dynamically based on enumeration order, which can cause launch files to reference stale device paths after reboots or reconnections. This skill teaches how to write udev rules that create stable symlinks such as /dev/teensy_main, /dev/lidar, and /dev/roboclaw.

Core Features & Use Cases

  • Determine device attributes (vendor, product, serial, kernel path) with udevadm and craft precise rules that match those attributes.
  • Map common robot peripherals (Teensy, LIDAR, motor controllers) to deterministic /dev symlinks, replacing hard-coded device paths in ROS 2 launch files.
  • Debug, reload, and verify rules across plug/unplug cycles to ensure consistent device naming and minimal downtime.

Quick Start

Define a rule that maps a connected Teensy serial device to a persistent /dev/teensy_main symlink, reload udev rules, and verify the symlink exists.

Frequently Asked Questions about udev-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why do my USB serial device paths change after rebooting my Linux robot?

Linux assigns USB serial device names dynamically based on enumeration order, causing paths to change. You can create persistent symlinks using udev rules to map hardware to stable paths like /dev/teensy_main.

How do I create persistent USB device names for a Teensy or LIDAR on Linux?

To create persistent USB device names, use udevadm to determine device attributes. Then craft udev rules matching those attributes to generate stable /dev symlinks for your hardware.

How do I write udev rules to map a motor controller to a specific /dev symlink?

You write udev rules by extracting the device's kernel path and unique serial attributes using udevadm. The rule matches these attributes to create a deterministic /dev symlink for your motor controller.

What is the best way to fix stale device paths in ROS 2 launch files?

The best way to fix stale device paths in ROS 2 launch files is to replace hard-coded paths with persistent udev symlinks. This ensures launch scripts always reference stable device names across reboots.

How do I debug and verify udev rules for persistent device naming?

To debug and verify udev rules for persistent device naming, reload the udev rules and test symlink creation across plug/unplug cycles. This ensures correct attribute matching and consistent device naming.

Can I use udev rules to manage multiple identical USB devices on the same robot?

Yes, you can use udev rules to manage multiple identical USB devices by matching their unique serial numbers. This maps each device to a distinct persistent symlink, preventing naming conflicts.