ping

按网段ping主机返回在线状态

通过以下命令,可以按网段ping所有的主机,并返回那些ip状态为在线,前提是安装nmap 命令: nmap -sP 220.181.38.0/24 运行结果如下: ➜ ~ nmap -sP 220.181.38.0/24 Starting Nmap 6.40 ( http://nmap.org ) at 2021-06-26 11:27 CST Nmap scan report for 220.181.38.97 Host is up (0.16s latency). Nmap scan report for 220.181.38.98 Host is up (0.16s latency). Nmap scan report for 220.181.38.99 Host is up (0.18s latency). Nmap scan report for 220.181.38.129 Host is up (0.16s latency). Nmap scan report for 220.181.38.130 Host is up (0.16s latency).