netstat -anp
需要有root权限,不然会输出
(No info could be read for "-p": geteuid()=1000 but you should be root.)
或者:
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
解决方法:
netstat -an
这篇明显是不知其所以然的,但是懒得看 netstat参数的具有用法了,以后补上