I connect to my Arduino board with the following Python code.
device=glob.glob(\"/dev/ttyUSB*\")[0] time.sleep(1) arduino = serial.Serial(device, 115200, timeout
You can use
$ fuser /dev/ttyUSB0
to list the PIDs of the processes using the file. Alternatively, if your fuser command supports it you can use the -k option to kill them.
fuser
-k