tcp 0 0 :::111 :::* LISTEN
以上是 netstat -nl | 的输出grep 111
:::111段是什么意思?
最佳答案
technet.microsoft.com 说:
Displays active TCP connections, ports on which the computer is listening, Ethernet statistics, the IP routing table, IPv4 statistics (for the IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for the IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). Used without parameters, netstat displays active TCP connections.
所以你可以找到哪些地址和端口被使用和监听。例如,你想在端口 8080 上运行一个 Tomcat 服务器。但它用过。所以你可以运行:
netstat -ano | find "8080"
输出会是这样的:
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1185
TCP [::]:8080 [::]:0 LISTENING 1185
它说进程号1185正在使用这个端口。如果有必要使用此端口,您可以关闭使用此端口的应用程序并通过此命令在其上运行您的服务器:
taskkill /F /PID 1185
关于linux - 了解 netstat 输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40277020/