Search code examples
linuxsocketstcpterminalpid

Finding TCP connections with pids


I tried to display all the TCP connections with pids on ubuntu terminal but am not able to do it. Can someone tell a single command to find all tcp connections with pids on ubuntu terminal ?


Solution

  • Take a look at lsof man page. I found:

    [sudo] lsof -i TCP