TommasoF
TommasoF

Reputation: 825

View tty used by applications

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

Answers (1)

jgr
jgr

Reputation: 3974

Try to use the command lsof.

lsof /dev/ttyX

To get the PID directly, use:

lsof -Fp /dev/ttyX

Upvotes: 4

Related Questions