Reputation: 825
i want to control the TTYs (serial port )used by applications on my pc. there is an applications that shows the status of each port by indicating the processes which are using? Thanks a lot!
Upvotes: 1
Views: 2788
Reputation: 3974
Try to use the command lsof
.
lsof /dev/ttyX
To get the PID directly, use:
lsof -Fp /dev/ttyX
Upvotes: 4