Linux查看端口

linux 查看端口的命令为:

  netstat

常用的参数有 anp,如:

  netstat -anp

查看指定的端口,如查看端口 80 是否开启中:

  netstat -anp | grep 80

备注:Windows 的 CMD 查看端口的命令也是 netstat,如查看所有的 TCP 端口:

  netstat -anp tcp

Windows 的命令行中查看 linux 指定的端口是否打开,命令如下(查看 80 端口):

  start /min telnet 192.168.1.3 80

弹出的窗口如不自动关闭则表示该端口处于打开状态,否则处于关闭状态。

原文地址:https://www.cnblogs.com/hapday/p/6409777.html