Find and kill the process that is using a serial port
killall
expects a substring of the program's name as argument. To kill a process by its process ID, use kill
.
You can directly kill all the processes that have a file open with the command fuser
.
fuser -k /dev/ttyUSB9