不小心通过rm 命令将/dev/ttyUSBx串口删除了,又不想通过系统重启或者热插拔的方式使其恢复,该如何操作呢?
可以考虑使用如下方法,参考自:
linux - How to restart ttyusb* - Super User
1.Find the driver associated to your ttyUSBx device.
可以使用命令
cat /proc/tty/drivers
来查看ttyUSBx所属的驱动,
然后使用命令查看实际使用的usb转串口的设备名,一般有ftdi_sio、
pl2303、cp210x等
lsmod | grep usbserial
2.Unload the driver
使用命令卸载设备
sudo modprobe -r pl2303 #or the name that matches your config
3.Re-load the driver
使用命令重新挂载
sudo modprobe pl2303 #or the name that matches your config