netstat -tulpen

t: tcp

u:udp

l:--listening          display listening server sockets

p:--programs           display PID/Program name for sockets

e:--extend             display other/more information

n:--numeric            don't resolve names

 

 

ubuntu中查看开启的服务和端口 netstat -tulpen_网络