How to parse netstat command in order to get process name and PID from it?

后端 未结 7 2261
不思量自难忘°
不思量自难忘° 2020-12-24 02:26

I\'m trying to determine what application is using certain port and get netstat -tlnp | grep for Linux.

This command return the following o

7条回答
  •  自闭症患者
    2020-12-24 02:57

    Also you can get rid of that "you have to be root" message by redirecting stderr to /dev/null

    netstat -tlnp 2>/dev/null | grep ...
    

提交回复
热议问题