Fedora Atomic
2024-10-24
Access USB serial device in container
Create a udev rule on the host for all usb-serial devices. Set OWNER to your 1000 user.
cat << EOF | sudo tee /etc/udev/rules.d/50-usb-serial.rules
SUBSYSTEM=="tty", SUBSYSTEMS=="usb-serial", OWNER="jas"
EOF
Reload udev.
sudo udevadm control --reload-rules
sudo udevadm trigger
The serial device should now be owned by your user.
ls -l /dev/ttyUSB0
crw-rw----. 1 jas dialout 188, 0 Mar 15 11:09 /dev/ttyUSB0
You can now run minicom inside the toolbox container.
distrobox enter default
minicom -D /dev/ttyUSB0