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 ?
Take a look at lsof man page. I found:
[sudo] lsof -i TCP